This article provides a solution for when Adobe Commerce cron jobs do not finish executing and persist in a
running status, which prevents other cron jobs from running. This can happen for a number of reasons, such as network issues, application crashes, redeployment issues.
Adobe Commerce on cloud infrastructure, all versions
Symptoms of cron jobs that must be reset include:
Running this command without the
--job-code option resets all cron jobs, including those currently running, so we recommend using it only in exceptional cases, such as after you have verified that all cron jobs must be reset. Re-deployment runs this command by default to reset cron jobs, so they recover appropriately after the environment is back up. Avoid using this solution when indexers are running.
To resolve this issue, you must reset the cron job(s) using the
cron:unlock command. This command changes the status of the cron job in the database, ending the job forcefully to allow other scheduled jobs to continue.
shell echo $MAGENTO_CLOUD_RELATIONSHIPS | base64 -d | json_pp
shell mysql -hdatabase.internal -uuser -ppassword main
shell use main
shell SELECT * FROM cron_schedule WHERE status = 'running';
job_codeof any job running longer than usual.
shell ./vendor/bin/ece-tools cron:unlock --job-code=<job_code_1> [... --job-code=<job_code_x>]