1

I am having an issue with my Magento 2.2.3 using PHP 7.1 My cron jobs are set as follows:

9,24,38,52 * * * * /usr/local/bin/php /home/website/public_html/update/cron.php >> /home/stebbins/public_html/var/log/update.cron.log

1,25,39,55 * * * * /usr/local/bin/php /home/website/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /home/stebbins/public_html/var/log/magento.cron.log

0,9,39,49 * * * * /usr/local/bin/php /home/website/public_html/bin/magento setup:cron:run >> /home/stebbins/public_html/var/log/setup.cron.log

When I run the group crons via CLI it says they ran as scheduled, but nearly all appear as status "Missed" and "Too late for schedule". There are also 6 instances of the order export job with status of "running". Please see the screen shots below this message for the cPanel cron settings, cron_schedule table, and Magento admin cron settings.

I think this is due to the crons being "stuck", for lack of a better term and I've been reading the documentation at https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-cron.html . I am having a really hard time getting this fixed and I'm spinning my wheels, so, I'm posting here to hopefully get an answer.

  • Should I manually delete all the "running" jobs from the cron_schedule table?
  • Is there a CLI command for Linux for this?
  • Am I just barking up the wrong tree and do you have a better fix?

Thanks so much in advance!

---Screen shots below---

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

1 Answer 1

2

Should I manually delete all the "running" jobs from the cron_schedule table?

Yes, execute query "delete from cron_scheduled where status = 'running'"

Is there a CLI command for linux for this?

mysql ... -e "delete from cron_scheduled where status = 'running'" :)

Am I just barking up the wrong tree and do you have a better fix?

Upgrade to Magento 2.2.6

Also, why you do not run cron every minute?

1
  • Thanks for the input. I manually deleted them from the table, flushed the cache, reindexed, and now all of them are running with success except orderexport. There are still a couple "missed" but then they run successfully. Any idea why the orderexport would fail? Also, I can't run every minute on this hosting. Its a shared server. Lastly, once I get this thing stable I'll take it to 2.2.6, actually, 2.3 but a failed upgrade is behind all of this actually.
    – Kory
    Commented Jan 2, 2019 at 20:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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