From 06821b752ec58e4cde94339e90ae3214cb42af69 Mon Sep 17 00:00:00 2001 From: Rafael Grigorian <5500199+null93@users.noreply.github.com> Date: Mon, 8 Jun 2026 12:31:37 -0500 Subject: [PATCH] Better check before removing crons for magento2 recipe --- recipe/magento2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/magento2.php b/recipe/magento2.php index c41b6691c..c533944ea 100644 --- a/recipe/magento2.php +++ b/recipe/magento2.php @@ -595,7 +595,7 @@ function magentoDeployAssetsSplit(string $area): void */ desc('Remove cron from crontab and kill running cron jobs'); task('magento:cron:stop', function () { - if (has('previous_release')) { + if (has('previous_release') && test("[ -f {{previous_release}}/{{magento_dir}}/bin/magento ]")) { run('{{bin/php}} {{previous_release}}/{{magento_dir}}/bin/magento cron:remove'); }