You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #27 and its possible solution #38, but along a different line.
Here's what I'm doing.
I have a large number of crons on my site because I use an RSS Importer to import posts from dozens of feeds. The RSS Importer checks the feeds once per (hour, 2 hours, etc., it varies). I do try to stagger the crons so they don't all run at once, but given all the other WP core related crons and crons for future publishing posts, and etc., etc., I usually have at least half a dozen crons that are ready to run Now.
I have WP Cron disabled and on my server I run the following:
*/5 * * * * cd /home/public_html && /usr/local/bin/wp cron event run 'publish_future_post' --due-now
*/5 * * * * cd /home/public_html && /usr/local/bin/wp cron event run 'fetch_single_feed_hook' --due-now
*/8 * * * * cd /home/public_html && /usr/local/bin/wp cron event run --due-now
The problem:
Sometimes wp cron event run 'fetch_single_feed_hook' --due-now has not finished firing by the time the wp cron event run --due-now starts, and then I get duplicate results. This is the problem described in #27.
My suggestion:
If there was an --exclude option to the cron event command, I could run something like:
wp cron event run --due-now --exclude=fetch_single_feed_hook,publish_future_post
Then only the other crons due Now would run, and not the ones that potentially are already running separately.
The text was updated successfully, but these errors were encountered:
I ran into similar issue where I have a long running hook that I'd like to be able to run less frequently then everything else. I'll work on a pull request.
@danielbachhuber Is this still a valid issue and requires a pull request?
I see this comment #80 (comment) but it is not yet merged so wanted to confirm before proceeding forward.
Related to #27 and its possible solution #38, but along a different line.
Here's what I'm doing.
I have a large number of crons on my site because I use an RSS Importer to import posts from dozens of feeds. The RSS Importer checks the feeds once per (hour, 2 hours, etc., it varies). I do try to stagger the crons so they don't all run at once, but given all the other WP core related crons and crons for future publishing posts, and etc., etc., I usually have at least half a dozen crons that are ready to run
Now
.I have WP Cron disabled and on my server I run the following:
The problem:
Sometimes
wp cron event run 'fetch_single_feed_hook' --due-now
has not finished firing by the time thewp cron event run --due-now
starts, and then I get duplicate results. This is the problem described in #27.My suggestion:
If there was an
--exclude
option to the cron event command, I could run something like:wp cron event run --due-now --exclude=fetch_single_feed_hook,publish_future_post
Then only the other crons due
Now
would run, and not the ones that potentially are already running separately.The text was updated successfully, but these errors were encountered: