开发者

Compare cron to php date()

I have a cron that executes many files every mi开发者_C百科nute. But some of them is not needed to be executed every minute, I generate cron's automatically for each of them. So, I need to compare a cron e.g. 0 2 * * * to date(), and see if the cron has to be executed now, do something in my code.

Thank you.


You should configure each of the scripts as an separate cronjob. Run in the cron only code that you want executed for the iteration time of the cron itself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜