Forum Moderators: coopster

Message Too Old, No Replies

Calculating Next Crontab Execution

Crontab

         

Jafo

5:35 pm on Apr 25, 2006 (gmt 0)

10+ Year Member



Was looking for a class to do this but came up empty. The PHP script I have to write up will parse out a crontab entry, exammple:

30 18 * * *

How would I determine when the next time this command will be executed so I can print it to the screen?

Jafo

7:08 pm on Apr 25, 2006 (gmt 0)

10+ Year Member



Thanks for everyones help. heh..

Anyway, to follow up, this class has the capability:

[phpclasses.org...]

jatar_k

7:11 pm on Apr 25, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



it would run everyday at 1830 wouldn't it?

the order is (I believe)

min hour day_of_month month day_of_week

since the last 3 are stars then that would be every day of every month at 1830 (630 PM)

or are you looking to output the time remaining until it's next execution?

<added>too slow, was just answering when you posted ;)