deployer icon indicating copy to clipboard operation
deployer copied to clipboard

M2 recipe : handle cron stop in try catch

Open gbobts opened this issue 1 year ago • 2 comments
trafficstars

This change handle the case when cron:remove can not be executed properly, for example when setup:upgrade or Magento 2 installation wasn't done properly.

Try/Catch prevents breaking of deployment (as cron stopping is nice to have, but not required).

gbobts avatar May 10 '24 12:05 gbobts

I'm not entirely sure this should be in the default recipe at all. Installing the cron is a one-off task and shouldn't occur on every deployment.

peterjaap avatar May 16 '24 19:05 peterjaap

  1. I believe stopping cron jobs while deploying is a good practice
  2. The path to bin/magento in the crontab will contain the release number while executing cron:install manually, so this path should be updated by the deployment process

So I believe this MR should be accepted

gbobts avatar May 17 '24 12:05 gbobts