playing with cron
This commit is contained in:
parent
7823c37c8a
commit
d9e0c07eb5
14
cron.mk
14
cron.mk
|
@ -1,9 +1,17 @@
|
||||||
MANDATORY-cron =
|
MANDATORY-cron = true
|
||||||
|
|
||||||
start-cron:
|
start-cron:
|
||||||
ssh $(SSH_USER)@$(host) 'crontab -l | sed "/^#make-deploy-cron:$(DEPLOY_NAME)/,+1 d" | { cat; echo "#ck-deploy-cron:$(DEPLOY_NAME)"; cat "$(DEPLOY_NAME)/crontab"; } | crontab -'
|
@- echo "\n### starting..."
|
||||||
|
@- $(foreach host,$(DEPLOY_HOSTS), \
|
||||||
|
echo "$(host)"; \
|
||||||
|
ssh $(SSH_USER)@$(host) 'crontab -l | sed "/^#make-deploy-cron:$(DEPLOY_NAME)/,+1 d" | { cat; echo "#ck-deploy-cron:$(DEPLOY_NAME)"; cat "$(DEPLOY_NAME)/crontab"; } | crontab -'; \
|
||||||
|
)
|
||||||
|
|
||||||
stop-cron:
|
stop-cron:
|
||||||
ssh $(SSH_USER)@$(host) 'crontab -l | sed "/^#make-deploy-cron:$(DEPLOY_NAME)/,+1 d" | crontab -'
|
@- echo "\n### stopping ..."
|
||||||
|
@- $(foreach host,$(DEPLOY_HOSTS), \
|
||||||
|
echo "$(host)"; \
|
||||||
|
ssh $(SSH_USER)@$(host) 'crontab -l | sed "/^#make-deploy-cron:$(DEPLOY_NAME)/,+1 d" | crontab -'; \
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue