0

It seems like we're having CRON issues, I usually check it via this command below.

./n98-magerun2.phar sys:cron:history

Magento 2 CRON issues

How could I check it more precisely?

1 Answer 1

0

There are some ways to check it via DB and logs, you will be able the check it via MySQL using this command too:

select * from cron_schedule where status='error';

For example:

+-------------+-----------------------------------------------------+--------+-------------------------------------------+---------------------+---------------------+---------------------+-------------+
| schedule_id | job_code                                            | status | messages                                  | created_at          | scheduled_at        | executed_at         | finished_at |
+-------------+-----------------------------------------------------+--------+-------------------------------------------+---------------------+---------------------+---------------------+-------------+
|     8504994 | sales_grid_order_creditmemo_async_insert            | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 00:49:05 | 2021-07-21 01:48:00 | 2021-07-21 01:48:58 | NULL        |
|     8505054 | sales_send_order_emails                             | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 00:49:05 | 2021-07-21 01:48:00 | 2021-07-21 01:48:58 | NULL        |
|     8505114 | sales_send_order_invoice_emails                     | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 00:49:05 | 2021-07-21 01:48:00 | 2021-07-21 01:48:58 | NULL        |
|     8505234 | sales_send_order_creditmemo_emails                  | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 00:49:05 | 2021-07-21 01:48:00 | 2021-07-21 01:48:58 | NULL        |
|     8505303 | outdated_authentication_failures_cleanup            | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 00:49:05 | 2021-07-21 01:48:00 | 2021-07-21 01:48:58 | NULL        |
|     8505727 | staging_remove_updates                              | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 00:49:05 | 2021-07-21 01:48:00 | 2021-07-21 01:48:59 | NULL        |
|     8506565 | catalog_product_outdated_price_values_cleanup       | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 01:49:04 | 2021-07-21 02:48:00 | 2021-07-21 02:49:01 | NULL        |
|     8506625 | catalog_product_frontend_actions_flush              | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 01:49:04 | 2021-07-21 02:48:00 | 2021-07-21 02:49:00 | NULL        |
|     8506818 | sales_grid_order_shipment_async_insert              | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 01:49:04 | 2021-07-21 02:48:00 | 2021-07-21 02:49:00 | NULL        |
|     8507058 | sales_send_order_shipment_emails                    | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 01:49:05 | 2021-07-21 02:48:00 | 2021-07-21 02:49:00 | NULL        |
|     8507550 | staging_apply_version                               | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 01:49:05 | 2021-07-21 02:48:00 | 2021-07-21 02:49:00 | NULL        |
|     8507610 | staging_remove_updates                              | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 01:49:05 | 2021-07-21 02:48:00 | 2021-07-21 02:49:00 | NULL        |
|     8513013 | magemojo_cron_cleanup                               | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 04:49:05 | 2021-07-21 05:00:00 | 2021-07-21 05:02:09 | NULL        |
|     8513628 | mm_consumer_negotiableQuotePriceUpdate              | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 04:49:06 | 2021-07-21 05:02:00 | 2021-07-21 05:02:03 | NULL        |
|     8514014 | ddg_automation_campaign                             | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 04:49:06 | 2021-07-21 05:00:00 | 2021-07-21 05:02:09 | NULL        |
|     8524153 | magento_newrelicreporting_cron                      | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 10:49:01 | 2021-07-21 11:48:00 | 2021-07-21 11:48:58 | NULL        |
|     8524420 | indexer_update_all_views                            | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 10:49:01 | 2021-07-21 11:48:00 | 2021-07-21 11:48:58 | NULL        |
|     8525022 | mm_consumer_sharedCatalogUpdatePrice                | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 10:49:02 | 2021-07-21 11:48:00 | 2021-07-21 11:48:58 | NULL        |
|     8530245 | staging_synchronize_entities_period                 | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 13:49:02 | 2021-07-21 14:48:00 | 2021-07-21 14:48:59 | NULL        |
|     8530485 | mm_consumer_codegeneratorProcessor                  | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 13:49:02 | 2021-07-21 14:48:00 | 2021-07-21 14:48:58 | NULL        |
|     8530545 | mm_consumer_exportProcessor                         | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 13:49:02 | 2021-07-21 14:48:00 | 2021-07-21 14:48:58 | NULL        |
|     8530605 | mm_consumer_negotiableQuotePriceUpdate              | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 13:49:02 | 2021-07-21 14:48:00 | 2021-07-21 14:48:58 | NULL        |
|     8530845 | mm_consumer_inventoryQtyCounter                     | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 13:49:02 | 2021-07-21 14:48:00 | 2021-07-21 14:48:58 | NULL        |
|     8530905 | mm_consumer_async.operations.all                    | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 13:49:02 | 2021-07-21 14:48:00 | 2021-07-21 14:48:58 | NULL        |
|     8537950 | mm_consumer_product_action_attribute.website.update | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 17:49:05 | 2021-07-21 18:48:00 | 2021-07-21 18:48:59 | NULL        |
|     8538130 | mm_consumer_negotiableQuotePriceUpdate              | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 17:49:05 | 2021-07-21 18:48:00 | 2021-07-21 18:48:59 | NULL        |
|     8538190 | mm_consumer_sharedCatalogUpdatePrice                | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 17:49:05 | 2021-07-21 18:48:00 | 2021-07-21 18:48:59 | NULL        |
|     8538250 | mm_consumer_sharedCatalogUpdateCategoryPermissions  | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 17:49:05 | 2021-07-21 18:48:00 | 2021-07-21 18:48:59 | NULL        |
|     8538310 | mm_consumer_quoteItemCleaner                        | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 17:49:05 | 2021-07-21 18:48:00 | 2021-07-21 18:48:59 | NULL        |
|     8538370 | mm_consumer_inventoryQtyCounter                     | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 17:49:05 | 2021-07-21 18:48:00 | 2021-07-21 18:48:59 | NULL        |
|     8539250 | flush_preview_quotas                                | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 18:49:06 | 2021-07-21 19:48:00 | 2021-07-21 19:48:59 | NULL        |
|     8539591 | staging_remove_updates                              | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 18:49:06 | 2021-07-21 19:48:00 | 2021-07-21 19:48:59 | NULL        |
|     8539651 | staging_synchronize_entities_period                 | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 18:49:06 | 2021-07-21 19:48:00 | 2021-07-21 19:48:59 | NULL        |
|     8539771 | mm_consumer_product_action_attribute.update         | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 18:49:06 | 2021-07-21 19:48:00 | 2021-07-21 19:49:00 | NULL        |
|     8539891 | mm_consumer_codegeneratorProcessor                  | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 18:49:06 | 2021-07-21 19:48:00 | 2021-07-21 19:48:59 | NULL        |
|     8540311 | mm_consumer_async.operations.all                    | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 18:49:07 | 2021-07-21 19:48:00 | 2021-07-21 19:48:59 | NULL        |
|     8540921 | sales_send_order_shipment_emails                    | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 19:49:05 | 2021-07-21 20:48:00 | 2021-07-21 20:48:55 | NULL        |
|     8540981 | sales_send_order_creditmemo_emails                  | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 19:49:05 | 2021-07-21 20:48:00 | 2021-07-21 20:48:55 | NULL        |
|     8541412 | staging_apply_version                               | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 19:49:06 | 2021-07-21 20:48:00 | 2021-07-21 20:48:55 | NULL        |
|     8541472 | staging_remove_updates                              | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 19:49:06 | 2021-07-21 20:48:00 | 2021-07-21 20:48:55 | NULL        |
|     8541532 | staging_synchronize_entities_period                 | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 19:49:06 | 2021-07-21 20:48:00 | 2021-07-21 20:48:56 | NULL        |
|     8542012 | mm_consumer_sharedCatalogUpdateCategoryPermissions  | error  | Parent Cron Process Terminated Abnormally | 2021-07-21 19:49:06 | 2021-07-21 20:48:00 | 2021-07-21 20:48:50 | NULL        |
+-------------+-----------------------------------------------------+--------+-------------------------------------------+---------------------+---------------------+---------------------+-------------+

The 'Parent Cron Process Terminated Abnormally' usually has more information on it in the /var/log/cron.log.

For example:

[2021-05-21 03:48:53] WARN Crons suspended due to high load average: 2.0654166666667
[2021-05-21 03:49:09] WARN Crons suspended due to high load average: 2.1895833333333
[2021-05-21 03:49:14] WARN Crons suspended due to high load average: 2.1908333333333
[2021-05-21 03:49:19] WARN Crons suspended due to high load average: 2.11875
[2021-05-21 03:49:24] WARN Crons suspended due to high load average: 2.0158333333333
[2021-05-21 03:49:35] WARN Crons suspended due to high load average: 2.0445833333333
[2021-05-21 03:49:40] WARN Crons suspended due to high load average: 2.02125
[2021-05-21 03:49:52] WARN Crons suspended due to high load average: 2.0275
[2021-05-21 04:03:03] WARN Crons suspended due to high load average: 2.04875
[2021-05-21 04:03:08] WARN Crons suspended due to high load average: 2.0916666666667
[2021-05-21 04:03:13] WARN Crons suspended due to high load average: 2.0508333333333
[2021-05-21 04:03:18] WARN Crons suspended due to high load average: 2.1391666666667
[2021-05-21 04:03:24] WARN Crons suspended due to high load average: 2.0545833333333
[2021-05-21 04:03:29] WARN Crons suspended due to high load average: 2.06375

This indicates the cron is hitting the max load.

After solving the issues

After solve the issues you might be able to reset the CRON schedule running these two commands too:

rm /srv/public_html/var/cron/* -rf

DB

truncate cron_schedule;

Your Answer

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

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