Scheduled event does not run at midnight

WP-Cron is not a guaranteed time task scheduler. The trigger for WP-Cron is somebody visiting the site itself, so if nobody visits the site at midnight, then the job doesn’t run until somebody does visit the site later.

Similarly, if you use a whole page caching mechanism like WP-Super-Cache, then anonymous users will not really be “visiting” the site since they’re getting cached pages. So that can impact WP-Cron’s ability to run on time as well.

If you need to run timed events precisely, then you need to use a real cron mechanism instead.

Leave a Comment