action-scheduler
action-scheduler copied to clipboard
Big time difference for next queue
Hi, I am getting this notice:
The next queue will begin processing in approximately 7761 seconds.
Can you please help me to sort this out asap. Thanks!
Hi, @vaibhav011286.
The lock duration defaults to one minute, whereas it seems yours may be configured to a much higher value. So, it's likely that this is set by another plugin you are using, or possibly by some custom code.
If you are unsure, then (perhaps within a staging site that faithfully replicates your live site) you could start by deactivating all plugins, then reactivate them one-by-one until you determine:
A) Which plugin or plugins use Action Scheduler. B) Which is overriding the lock timeout value.
Or, if you are comfortable doing so, you could consider scanning for references to action_scheduler_lock_duration (which is the name of the filter hook used when overriding the default lock timeout value).
Hi, I searched whole WP using plguin String Locator, and not found any custom code which can override action_scheduler_lock_duration filter default value.
Attaching shot of found string in whole WP:
Interesting, then I'm not sure where this is being changed or if some other factor is at work.
You could add a custom snippet (using your preferred tool, or else a custom plugin) to try and override things and force a 30 second lock duration, though:
add_filter( 'action_scheduler_lock_duration', fn () => 30, 1000 );
I recommend trying this first on a testing/staging site, however.
@vaibhav011286 let us know if you need any further support. It doesn't seem like the origin of the problem is in Action Scheduler itself, though, so we'll likely close this issue in due course if we don't hear back.
Closing.