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'); }