0
votes

Im trying to set a magento cron by doing the follow:

crontab -u magento2 -e

After that i press i for insert the tekst:

        • /usr/local/bin/php /home/magento2/public_html/magento2 cron:run | grep -v "Ran jobs by schedule" >> /home/magento2/public_html/magento2/var/log/magento.cron.log
        • /usr/local/bin/php /home/magento2/public_html/magento2/update/cron.php >> /home/magento2/public_html/magento2/var/log/update.cron.log
        • /usr/local/bin/php /home/magento2/public_html/magento2/bin/magento setup:cron:run >> /home/magento2/public_html/magento2/var/log/setup.cron.log

After that i press escape and type :x! to save the file.

Then the following msg appears:

"tmp/crontab.zchprf"3L, 46rC written crontab: installing new crontab "tmp/crontab.zchprf":1: bad day-of-week errors in crontab file, can't install

Thanks for the help

1
Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See What topics can I ask about here in the Help Center. Perhaps Super User or Unix & Linux Stack Exchange would be a better place to ask. Also see Where do I post questions about Dev Ops?jww

1 Answers

0
votes

cron entry taking 5 values while you have typed * on 4 locations so giving error on saving cron. Use this in your cron

 * * * * * /usr/local/bin/php /home/magento2/public_html/magento2 cron:run | grep -v "Ran jobs by schedule" >> /home/magento2/public_html/magento2/var/log/magento.cron.log