{"id":632,"date":"2021-04-07T14:32:01","date_gmt":"2021-04-07T14:32:01","guid":{"rendered":"https:\/\/mklasen.com\/?p=632"},"modified":"2021-04-07T14:32:02","modified_gmt":"2021-04-07T14:32:02","slug":"wordpress-cronjobs-in-multisite","status":"publish","type":"post","link":"https:\/\/mklasen.com\/wordpress-cronjobs-in-multisite\/","title":{"rendered":"WordPress Cronjobs in Multisite"},"content":{"rendered":"\n
It’s always better to add a cronjob for running WordPress’ cronjobs. If you don’t, you’re dependent on website visits to launch cronjobs.<\/p>\n\n\n\n
Luckily we have wp-cli for that, the Except for multisite<\/strong><\/p>\n\n\n\n Each site within a multisite has it’s own cronjob queue, so it’s important to fire these for all websites. The snippet below will do exactly that!<\/p>\n\n\n\n It’s always better to add a cronjob for running WordPress’ cronjobs. If you don’t, you’re dependent on website visits to launch cronjobs. Luckily we have wp-cli for that, the wp cron event run –due-now command will process any cronjobs in queue. If you add this to your crontab, you’re all set. Except for multisite Each […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[1],"tags":[],"acf":[],"yoast_head":"\nwp cron event run --due-now<\/code> command will process any cronjobs in queue. If you add this to your crontab, you’re all set.<\/p>\n\n\n\n
wp site list --field=url | xargs -i -n1 wp cron event run --due-now --url=\"{}\"<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"