Hi,
I'm trying to come up with a function using PHP/MySQL (preferably a PHP only
solution) to find the next time that matches a particular pattern, where the
pattern is a combination of values or wildcards for minute, hour, day,
weekday, month (like a predictive version of Unix's cron.)
So, for example, I might ask for the next time that will match 8:00AM on a
Monday, the next time that will match 15 minutes past midnight on the 1st of
the month, or the next time it will be 11:59 on a Friday the 13th.
It is quite easy to figure out whether or not a particular time matches
these criteria, but I can see no way to predict when the next time it will
happen.
Any suggestions?
- Kevin
I'm trying to come up with a function using PHP/MySQL (preferably a PHP only
solution) to find the next time that matches a particular pattern, where the
pattern is a combination of values or wildcards for minute, hour, day,
weekday, month (like a predictive version of Unix's cron.)
So, for example, I might ask for the next time that will match 8:00AM on a
Monday, the next time that will match 15 minutes past midnight on the 1st of
the month, or the next time it will be 11:59 on a Friday the 13th.
It is quite easy to figure out whether or not a particular time matches
these criteria, but I can see no way to predict when the next time it will
happen.
Any suggestions?
- Kevin
Comment