How to check why cron was disabled

This article offers troubleshooting solutions for issues with cron in Adobe Commerce on cloud infrastructure products.

Affected products and versions

  • Adobe Commerce on cloud infrastructure, all versions

Issue

The following are symptoms of cron issues:

You have noticed that your cron wasn’t running.
For example: you see the following lines in the app/etc/env.php file:

  array (
    'enabled' => 0
  ),

An empty array would mean that the cron is enabled:

  array (
  ),

Causes

There are several reasons why the cron isn’t currently active:

  1. The cron was disabled due to missed OpCache settings.
  2. The Infrastructure team disabled your cron, because it was causing your site to perform-poorly/go-down.
  3. The cron wasn’t re-enabled because your deployment failed.

See one of the following sections for a solution to your issue.

Solutions

Solution for missed OpCache settings solution-missed-opcache-settings

See Cron stopped due to misconfigured or missing OpCache settings in our Commerce knowledge base.

Solution for disabled by Infrastructure team solution-disabled-by-infrastructure-team

  1. Check your previous support tickets in which your site was down or not responding.
  2. Then check whether the Infrastructure team indicated that they had disabled it.
  3. Verify that you have addressed the issues/concerns brought up by the Infrastructure team.
  4. Submit a Support request if you need further assistance to request to re-enable the cron and explain how you have addressed the issues that the Infrastructure team indicated.

Solution for deployment failed solution-deployment-failed

Check the deployment logs:

  1. If the deployment had failed during the setup:upgrade step, the cron won’t have been re-enabled.
    For example: you see this line in the deployment log:

    The command "/bin/bash -c "set -o pipefail; php ./bin/magento setup:upgrade --keep-generated --ansi --no-interaction | tee -a /app/$<project_id>/var/log/install_upgrade.log"" failed. Cache types config flushed successfully

  2. Otherwise, the deployment might have failed during some other stage. Check the deployment log and ensure that both lines appear (example below). If you don’t see both lines similar to this in the log, it means that the cron was not re-enabled:

    [2024-03-06T10:55:39.345564+00:00] INFO: Disable cron



    [2024-02-07T10:50:09.579005+00:00] INFO: Enable cron

Submit a Support request if you need further assistance.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a