MANDATORY = $(shell printenv MANDATORY) CRON_USER start-cron: @- echo "\n### starting..." @- $(foreach host,$(DEPLOY_HOSTS), \ echo "$(host)"; \ ssh $(SSH_USER)@$(host) "sudo -u $(CRON_USER) sh -c 'crontab -l | sed \"/^#make-deploy-cron:$(DEPLOY_NAME)/,+1 d\" | { cat; echo \"#make-deploy-cron:$(DEPLOY_NAME)\"; cat \"$(DEPLOY_PATH)/$(DEPLOY_NAME)/crontab\"; } | crontab -'"; \ sleep $(DEPLOY_START_DELAY); \ ) stop-cron: @- echo "\n### stopping ..." @- $(foreach host,$(DEPLOY_HOSTS), \ echo "$(host)"; \ ssh $(SSH_USER)@$(host) "sudo -u $(CRON_USER) sh -c 'crontab -l | sed \"/^#make-deploy-cron:$(DEPLOY_NAME)/,+1 d\" | crontab -'"; \ ) pull-cron: #nop