Editing cron timestamp in wp_option table

Let’s say I have a multisite with ~1000 blogs. One of the plugins triggers an action once a day using wp_cron. The issue is that this triggers on all sites at around the same time, slowing down the server. I would like to spread those actions out through the day.

As the timestamp of the next trigger is stored for each blog in the table wp_N_option, I was thinking of editing it through get_option and update_option.

Could there be any unforeseen side effects to this, or is it safe ? Is there information stored about wp_cron outside of this option table ?

How to run Ultima cron jobs without someone accessing the site?

I am trying to get cron jobs working properly using Ultima Cron. When someone accesses the site, the cron jobs are executed properly.

My understanding is that when i use cron tab (as opposed to simple) scheduler the job should run at the specified interval regardless of whether someone accesses the site or not. Is that correct?

The schedule of the cron job is */1+@ * * * * and when i hover over the scheduled time it shows the correct time. But it is only executed once someone accesses the site.


In the advanced settings of the (virtual server) I tried

* * * * * wget -O - -q -t 1 --no-check-certificate https://domain name.com/cron.php?cron_key=cron-key 


* * * * * wget -O - -q -t 1 https://domain name.com/cron.php?cron_key=cron-key 

The default value there was

*  *  *  *  *       cd /home/domain/userid/public_html && php /home/domain/userid/public_html/cron.php?cron_key=key 

My understanding is that the wget (which is installed) calls the cron.php file at the specified interval and this substitutes the user visitor?


In the .htaccess there was a allow from IP address. Seems like this prevented the cron from working properly. The line below works when added as cron tab for a ssl site.

* * * * * wget --no-check-certificate -O - -q -t 1 https://www.domain/cron.php?cron_key=key 

Cron fails because update folder does not exist

I am trying to setup cron for a magento 2 installation made through composer.

I have tried to manually add the following to my crontab:

* * * * * www-data php /path/to/m2/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /path/to/m2/var/log/magento.cron.log * * * * * www-data php /path/to/m2/update/cron.php >> /path/to/m2/var/log/update.cron.log * * * * * www-data php /path/to/m2/bin/magento setup:cron:run >> /path/to/m2/var/log/setup.cron.log 

If I then check the /path/to/m2/var/log/update.cron.log I can see the following message:

Could not open input file: /path/to/m2/update/cron.php

Obviously, because the folder /path/to/m2/update does not exist.

I am not sure why the folder and cron.php file is missing. Is there some bin/magento command that I have missed?