I have ran bin/magento cron:install and then show

Crontab has been generated and saved

but I run crontab -l, nothing was written into cron, any ideas?


I am also facing the same issue cron is working fine in local but not working in server. so I used the below method to test cron is working or not.

  • Magento creates three log files, which are var/log/magento.cron.log, var/log/update.cron.log and var/log/setup.cron.log. You can watch these log files.
  • You should see some input with the following SQL query: select * from cron_schedule. It keeps track of each cron job, when it is run, when it is finished if it is finished.
  • You can run the following commands on your command line, and see if they are running properly without any error.

    /usr/bin/php /var/www/prod/bin/magento cron:run | grep -v "Ran jobs by schedule"
    /usr/bin/php /var/www/prod/update/cron.php
    /usr/bin/php /var/www/prod/bin/magento setup:cron:run

For more reference see this doc Magento Devdocs

I hope it helps!

  • i've errors in magento.cron.log SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction, query was: UPDATE cron_schedule SET job_code = ?, status = ?, messages = ?, created_at = '2017-10-31 17:30:36', scheduled_at = '2017-10-31 17:37:00', executed_at = ?, finished_at = ? WHERE (schedule_id='1028796') , do you know how to fix it? – hkguile May 8 at 14:34
  • I have no idea about this error but i will share you if i found something. – Chirag Patel May 8 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.