How to run WP Cron the right way?
-
I have WordPress Multisite with several sites. I set up
DISABLE_WP_CRON
to true in mywp-config.php
.How to run
wp-cron.php
the right way?If we set up cron task with wget or curl we have 30 sec rule to execute PHP script. It’s so small to send tons of email notifications and do other stuff.
Maybe we can use something like this?
php -q wp-cron.php
But it’s only run cron to one site in Multisite (each site have their own cron tasks in different MySQL tables).
P. S. On wpmudev.org forum I found strange “solution” which also use curl.
Another P. S. WP CLI have awesome wp cron commands but it’s only allow run cron tasks manually (yep, we can use
--url
attr). For example:wp cron event list --url=multisite.com wp cron event list --url=subdomain.multisite.com
- The topic ‘How to run WP Cron the right way?’ is closed to new replies.