Skip to main content

This interval is less than the WP_CRON_LOCK_TIMEOUT constant

If you're seeing an error message saying This interval is less than the WP_CRON_LOCK_TIMEOUT constant it means the interval at which events with this schedule are due to run is less than the interval at which WordPress core actually runs events.

This is most commonly seen when a schedule uses an interval of less than 60 seconds.

Why is this a problem?

While WordPress core runs a cron event it makes use of a locking mechanism that prevents multiple processes running the same event. The maximum duration of this lock is set by the WP_CRON_LOCK_TIMEOUT constant, which by default is set to 60 seconds.

If an event action takes longer than this duration to run, and events are scheduled with an interval of less than this duration, then those events will not run according to their schedule. They will run late.

Do I need to fix this?

You may not need to fix anything, but you should remain aware of the potential late-running problem above. If you notice events with this short interval are missing their schedules then you may need to address it.

How do I fix this?

Firstly, take a look at the Cron events that have missed their schedule page, there's lots of useful information on there. If you require events to reliably run more frequently than once per minute then you should look into using a high performance cron runner such as Cavalcade or Cron Control.

If you are considering changing the value of the WP_CRON_LOCK_TIMEOUT constant then be sure that you have a good understanding of its effects.