devdocs icon indicating copy to clipboard operation
devdocs copied to clipboard

Run cron command twice

Open bh-ref opened this issue 11 years ago • 2 comments

http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html contains a hint that cron should run twice. This is at least true for the command php bin/magento cron:run.

Two questions:

  1. Is this also true for the other two mentioned commands: <your Magento install dir>/update/cron.php php bin/magento setup:cron:run Do they also have to run twice?

  2. Shouldn't the example code on that page thus actually list the command */1 * * * * php -c /etc/php5/cli/apache2 /var/www/html/magento2/bin/magento cron:run twice?

bh-ref avatar Nov 19 '15 12:11 bh-ref

Yes, cron must run twice in all cases. I'll check to make sure it's mentioned everywhere

For #2, no. cron run from a crontab runs every minute (in that example); thus, you must wait two minutes after every eligible change. But you shouldn't list a command in a crontab twice.

ghost avatar Nov 19 '15 19:11 ghost

I double-checked and this note is present in all the topics about cron. Closing. Please reopen if you disagree.

ghost avatar Nov 19 '15 19:11 ghost