0

In my production environment I am not able to run magento cronjobs every minute as the server is freezing when doing so. In order to solve this issue the cron jobs in crontab are set up to run every 10 minutes as follow:

*/10 * * * * /usr/bin/php7.2 /home/306000.cloudwaysapps.com/username/public_html/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /home/306000.cloudwaysapps.com/username/public_html/var/log/magento.cron.log
*/10 * * * * /usr/bin/php7.2 /home/306000.cloudwaysapps.com/username/public_html/update/cron.php >> /home/306000.cloudwaysapps.com/username/public_html/var/log/update.cron.log
*/10 * * * * /usr/bin/php7.2 /home/306000.cloudwaysapps.com/username/public_html/bin/magento setup:cron:run >> /home/306000.cloudwaysapps.com/username/public_html/var/log/setup.cron.log

Now I also setup the cronjob scheduler to schedule only every 10 minutes in Admin -> system -> cron jobs:

magento cron group index configuration

magento cron group default configuration

My problem is that doing so leads to have a huge number of missed jobs as even though I setup the generation of schedules to happens every 10 minutes, the jobs generated in 'cron_schedule' are generated for each minute and since cron:run is running only every 10 minutes most of them are missed.

sql extract of cron_schedule table

How can I solve this issue and what is the best cron job configuration in this example ?

  • Remove all cron and clear cache. And reschedule it. – Dhaduk Mitesh Nov 8 at 11:18
  • I did "truncate cron_schedule;" before and cleared the invalidated cache this is what I get afterward – grll Nov 8 at 11:25

Your Answer

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

Browse other questions tagged or ask your own question.