How to check why cron was disabled
This article offers troubleshooting solutions for issues with cron in ÃÛ¶¹ÊÓÆµ Commerce on cloud infrastructure products.
Description description
Environments
ÃÛ¶¹ÊÓÆµ Commerce on cloud infrastructure, all versions
Issue/Symptoms
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:
- The cron was disabled due to missed OpCache settings.
- The Infrastructure team disabled your cron, because it was causing your site to perform-poorly/go-down.
- The cron wasn’t re-enabled because your deployment failed.
Resolution resolution
Solution for missed OpCache setting
See Cron stopped due to misconfigured or missing OpCache settings in our Commerce knowledge base.
Solution for disabled by Infrastructure team
- Check your previous support tickets in which your site was down or not responding.
- Then check whether the Infrastructure team indicated that they had disabled it.
- Verify that you have addressed the issues/concerns brought up by the Infrastructure team.
- 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
-
Check the deployment logs:
- View and manage logs in our Commerce on Cloud Infrastructure Guide.
- Checking deployment log if Cloud UI has log snipped error in our Commerce knowledge base.
-
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:
code language-none 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
-
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:
code language-none [ 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.