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.
精彩评论