I think the best way is to use WP-CLI but you’d need to write a bash script to do this. Here is one that should do it for you:
WP_PATH="/path/to/wp"
for SITE_URL in = $(wp site list --fields=domain,path,archived,deleted --format=csv --path="$WP_PATH" | grep ",0,0$" | awk -F ',' '{print $1 $2}')
do
for EVENT_HOOK in $(wp cron event list --format=csv --fields=hook,next_run_relative --url="$SITE_URL" --path="$WP_PATH" | grep \"now\"$ | awk -F ',' '{print $1}')
do
wp cron event run "$EVENT_HOOK" --url="$SITE_URL" --path="$WP_PATH"
done
done
You’d then need to add this script to crontab and run it maybe every minute if you like
Related Posts:
- Running WP-Cron on Multisite networks the right way?
- Initialize WordPress environment to use in a real cron script
- Multiple wp_schedule_event cron jobs in plugin cause multi-execution
- Does wp-cron runs all tasks scheduled at same time together or one after other?
- export a csv file from the database with a cronjob
- How wp-cron can run in background if PHP is single threaded?
- WP Cron job timeout issues
- running wp-cron.php using php not wget
- Large WordPress CRON job
- How to Schedule Cronjobs for start of every month and year
- WordPress cron is running with previously set time intervals and not the updated one
- Can/should we delete wordpress cron jobs with no action?
- Setting up a cron job to auto update a custom field
- CRON job to update wp_usermeta value each day or week based on server time
- Cron not sending wp-mail()
- Php cron job (wp-cron) not working
- WPMU schedule doesn’t execute actions
- Execute scheduled cron with ajax call to wp-cron.php
- How can I cause run wp-cron to trigger sequentially?
- WordPress returning 404 for multisite pages
- How to bypass maintenance mode with external cron?
- How to call plugin function per site in a multisite?
- WordPress returns “The link you followed has expired” error page whenever I add a new site, add a user etc
- WP-CLI cron on multisite using WP-Toolkit “succeded”, but callback not executed
- WP CRON duplicate wp_insert_post with has < and > tag
- Best way to schedule daily change in CSS parameter
- NGINX rewrite rules for multisite
- Make a list of sites for each user in WPMU – switch_to_blog (display in SITE_ID: 1)
- WP & Server Speed [Teacher Question]
- Moving code from theme header to functions.php
- Is it best to avoid using $wpdb for security issues?
- Count posts on multisite with blog id
- wp_redirect only works on main site and not on other sites
- How to avoid duplicates when creating recent network posts
- How do I display offsite database info on my wordpress site?
- Timthumb.php image gallery not working on Multisite WordPress
- Scheduling an event inside plugin class is not working
- Find Site ID From WP_Post
- List all blogs, but exclude the main site
- How to disable all logins except Network login in WordPress Multi site?
- Switch from wp-cron to a server cron job
- Known Issues in WordPress When Upgrading PHP to ver 7
- WordPress homepage setup not working on first load
- PHP Parse error on WP-CLI, not on web server
- Is it legal to redefine wp_password_change_notification in a mu plugin?
- Why, when moving a WordPress multisite network, have my theme customisations stopped working?
- Authentication from sub-folder non-wp cookie WordPress
- need help adding a new sidebar to a page that can’t use page-templates -> multisite
- How can I fix this code [duplicate]
- WP-CLi PHP Warning: mysqli_query(): (HY000/1356): View During Search Replace
- How to sort posts by active category in WordPress?
- wordprees multi-site in user panel add filter
- How to Redirect Buddypress Directories To Login Page For Non Logged in Users
- bp-custom.php is not working on a WordPress multisite environment. how to fix it?
- WordPress Multisite login_redirect to primary blog and specific page based on role
- Unzip file in functions.php, and add it to cron
- How can I update WordPress plugins or WordPress itself in all server?
- call to undefined function mysql_connect
- Wp_Schedule_Event every few minutes doesn’t work
- Multiple cron jobs vs daily cron job doing multiple things? Which one yields better performance and scalability?
- Internal Server Errors – Moving working multi-site install to my localhost
- post_exists stops working in a scheduled event
- Merging Multiple WordPress Websites
- Annoying/confusing WordPress memory limit exhausted
- Automatically delete posts one by one depending on published time
- Create form which redirects to site in network?
- Redirect user role to a specific page on login in a multisite network?
- Use WP Cron to Clear a Page Cache?
- Multiple WordPress sites with different theme and plugin sharing the same content
- Changable favicon
- How come there is no error if I upgrade WordPress core after locking .htaccess permissions to 644?
- New database entry to trigger runing PHP/SQL query through link with token, without logging into the website
- Remove node from multisites?
- Full search and replace isn’t enough to make all pictures to be loaded with https
- PHP script to redirect traffic based on website accessed
- Update all posts in custom post types with wp_cron()?
- Add .php to end of all WordPress Pages (multisite)
- Sort WooCommerce data with WP-CRON?
- List all blogs apart from the current blog and main blog in WordPress Multisite
- Adding users to another blog
- Transfer WordPress Login Session to an Extended Webpage on the Same Domain
- Resource 404 error on multisite subdirectory install
- How do I routinely extract the thumbnail of the most recent post?
- Importing demo data in Multisite
- use system script advertising in wordpress multisite
- WP Admin Bar – Get current theme name as custom menu title
- WordPress Multisite Cron Issue
- Break a WordPress function to run in patches and re-continue
- Cron job to call php to email last 24 hours posts
- WP multisite network plugin fails to see classes loaded with spl autoload
- Host does not allow remote connection, so how do I transfer data to my WordPress site?
- Trying to post information from a remote database to wordpress page
- Custom PHP-coding in MU installs
- .htaccess on multisite and roots theme?
- How does one programmatically manage posts from a external php script?
- Force string into signup form
- How to execute add_action() function from custom plugin to Crontrol plugin or do_action()?
- I need a button to appear when not loged in and another when logged in, I need help fixing code PLEASE!
- How to avoid timeout waiting for output from CGI script?
- wordpress.org disallowing my plugin becuase of loading core files in cron cpanel file