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:
- 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
- WP-CLI – Selecting PHP version
- Uncaught Error: Call to undefined function wp_generate_attachment_metadata() @ wp-cron
- How to run multiple Async HTTP requests in WordPress?
- Integrating WordPress to my website, while keeping my own authentication system
- How does wordpress know which site to setup (on multisite)?
- Remove/unset options field from backend Settings->General?
- WP CLI info showing correct PHP binary but wrong version of PHP
- Multisite get_home_url(); – Getting URL for current site
- How to use wp_insert_user on WordPress Multisite?
- How to correct schedule my event weekly with wp_schedule_event()
- Network installation giving errors when viewing or adding a user
- How to make sure that only one wp_cron() runs at a time?
- Run W3 Total Cache Flush Function with Crontab [closed]
- Sort posts from multiple sites by date
- Fix 403 error on WordPress multisite network using subdomains
- wp_delete_auto_drafts() deletes links in menus
- Setting Up PHPUnit tests for WP development on Windows
- How to create Sub Sub domain Multi User blogs?
- Why am I getting ERR_NAME_NOT_RESOLVED when I add a site to my multisite installation? [closed]
- WP_cron won’t trigger my action
- Custom php page outside the scope of my theme
- Adding hreflang tags automatically in WordPress subdirectory multisite
- Different output from WP-CLI in bash vs PHP exec()
- How to add values to media “whitelist_options” in wp-admin/options.php template?
- How to change home or site url using action hooks or filter?
- WordPress returning 404 for multisite pages
- 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
- 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]
- 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 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
- 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]
- 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?
- Unzip file in functions.php, and add it to cron
- How can I update WordPress plugins or WordPress itself in all server?
- 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
- Automatically delete posts one by one depending on published time
- Redirect user role to a specific page on login in a multisite network?
- Use WP Cron to Clear a Page Cache?
- 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?
- 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
- Importing demo data in Multisite
- use system script advertising in wordpress multisite
- WP Admin Bar – Get current theme name as custom menu title
- Break a WordPress function to run in patches and re-continue
- Trying to post information from a remote database to wordpress page
- .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()?
- How to avoid timeout waiting for output from CGI script?
- Losing Session ID and sessionStorage when navigating to other domains on Multisite
- understanding wp_next_scheduled
- add_rewrite_rule image from /images/site2/favicon.ico to /favico.ico
- Internal server error when enabling Multisite in WordPress
- Background Tasks in a WP Cronjob?