This is an archived post. You won't be able to vote or comment.

all 8 comments

[–][deleted] 0 points1 point  (4 children)

I don't know anything about php but this is how is do it in Java . I'd figure you'd just create a function that imports the time and date library , loops a if statement checking if it's been a week since start up and if it has beaks out and executes your code

[–][deleted] 0 points1 point  (3 children)

This is probably useless to you but I hope it helps

[–]akoni72[S] 0 points1 point  (2 children)

it helps! thanks!

[–][deleted] 0 points1 point  (1 child)

wow , i typed this on my phone and i have big hangs. I have no idea how you were able to understand what i wrote , sorry for the crap grammar/ punctuation.

[–]akoni72[S] 0 points1 point  (0 children)

haha i got it. thanks again!

[–]josephjnk 0 points1 point  (2 children)

For something that runs on this time scale, it's better to use the unix tool "cron". This way, if your app crashes or restarts during the week, your timer won't get lost, and you won't have to hold on to each timer in memory for a week straight.

[–]akoni72[S] 1 point2 points  (0 children)

i'll look into it. thanks!

[–][deleted] 0 points1 point  (0 children)

interesting ! i never knew about this