cronjob. run php only in a specified interval of time
问题 I have set up a cronjob that excutes a php script every 35 minutes. The issue is that I only want it to run from 11 AM to 2 AM the next day. I want this to be automatic without having to add # manually to the crontab. I've tried putting something like this at the top of the php script : $time = date(H); if ($time < 23 & $time > 11) { echo 'Working'; } else { echo 'Stopped'; } But as you can see that only works on the same day. NOTE The server is using another time zone which has +4 hours of