1、参考
2、
crontab -l
crontab -e
# prod backup database
# 0 2 * * * cd /data/xxxxx && /usr/bin/sh yy_backup.sh
# prod auto update manage code
# * * * * * cd /data/xxxxx/ && source /etc/profile && /usr/bin/sh yy_auto_update_manage.sh
# temp auto update manage code
# * * * * * cd /data/xxxxx_temp/ && source /etc/profile && /usr/bin/sh yy_auto_update_manage.sh
# temp auto update spring service
# * * * * * cd /data/xxxxx_temp/ && source /etc/profile && /usr/bin/sh yy_auto_update.sh
# y4_kkk auto update
# * * * * * cd /data/y4_kkk/ && source /etc/profile && /usr/bin/sh au-auto-update.sh
# * * * * * sleep 10; cd /data/y4_kkk/ && source /etc/profile && /usr/bin/sh au-auto-update.sh
# * * * * * sleep 20; cd /data/y4_kkk/ && source /etc/profile && /usr/bin/sh au-auto-update.sh
# * * * * * sleep 30; cd /data/y4_kkk/ && source /etc/profile && /usr/bin/sh au-auto-update.sh
# * * * * * sleep 40; cd /data/y4_kkk/ && source /etc/profile && /usr/bin/sh au-auto-update.sh
# * * * * * sleep 50; cd /data/y4_kkk/ && source /etc/profile && /usr/bin/sh au-auto-update.sh
# prod yy_new backup database
0 2 * * * cd /data/yy_new && /usr/bin/sh db_backup_yy_new.sh
/bin/systemctl restart crond.service