Centos7 linux定时任务
1、参考
CentOS 7 定时任务 crontab 入门
Centos 利用crontab定时执行任务及配置方法
2、
crontab -l #查看当前用户定时任务
crontab -e #编辑当前用户定时任务
# prod backup database 0 2 * * * cd /data/xxx && /usr/bin/sh xxx_backup.sh # prod auto update manage code # * * * * * cd /data/xxx/ && source /etc/profile && /usr/bin/sh xxx_auto_update_manage.sh # temp auto update manage code # * * * * * cd /data/xxx_temp/ && source /etc/profile && /usr/bin/sh xxx_auto_update_manage.sh # temp auto update spring service # * * * * * cd /data/xxx_temp/ && source /etc/profile && /usr/bin/sh xxx_auto_update.sh # y4_xxx auto update # * * * * * cd /data/y4_xxx/ && source /etc/profile && /usr/bin/sh au-auto-update.sh # * * * * * sleep 10; cd /data/y4_xxx/ && source /etc/profile && /usr/bin/sh au-auto-update.sh # * * * * * sleep 20; cd /data/y4_xxx/ && source /etc/profile && /usr/bin/sh au-auto-update.sh # * * * * * sleep 30; cd /data/y4_xxx/ && source /etc/profile && /usr/bin/sh au-auto-update.sh # * * * * * sleep 40; cd /data/y4_xxx/ && source /etc/profile && /usr/bin/sh au-auto-update.sh # * * * * * sleep 50; cd /data/y4_xxx/ && source /etc/profile && /usr/bin/sh au-auto-update.sh # prod xxx_new backup database 0 2 * * * cd /data/xxx_new && /usr/bin/sh db_backup_xxx_new.sh
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
2019-06-17 jquery 五星评价(图片实现)