humanmade / Cavalcade

A better wp-cron. Horizontally scalable, works perfectly with multisite.
https://engineering.hmn.md/projects/cavalcade/
Other
519 stars 46 forks source link

Add WP CLI command to skip job backlog. #68

Open peterwilsoncc opened 6 years ago

peterwilsoncc commented 6 years ago

Adding a cron job with the code wp_schedule_event( 0, 'daily', 'cavalcade_daily' ); will cause the job to run constantly until it's run once for each day since 1/1/1970. Once the job has caught up it will run at midnight each day, as expected.

Adding a command such as wp cavalcade job restart {id} --skip-backlog will allow users to skip the backlog and ensure the job only runs once per day.

Follow up to humanmade/Cavalcade-Runner#53