Scheduled event does not run at midnight

I have an event scheduled to fetch feeds from different sources at midnight. I believe for some reason it is not being triggered. I use Core Control plugin for testing. When I ‘Run Now’ through it, it works fine. What could be possible reason? Any hint that could facilitate me to get to the cause?

There is no argument to the handler and it is a reoccurring once daily task.

1 Answer
1

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