| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- # ============================================
- # 超星数据同步定时任务配置
- # ============================================
- # 说明:
- # - 每天晚上12点开始执行,每个脚本间隔5分钟
- # - 日志文件保存在 logs/ 目录下
- # - 错误日志单独保存在 logs/ 目录下
- # ============================================
- # 执行时间表:
- # 00:00 - 请求系部信息API.py
- # 00:05 - 请求专业信息API.py
- # 00:10 - 请求班级信息API.py
- # 00:15 - 请求学生信息API.py
- # 00:20 - 请求学籍异动信息API.py
- # 第一个脚本:系部信息(每天00:00执行)
- 0 0 * * * /bin/bash /Users/wuzilong/work/00code/hzdyjs_xg/超星数据移植与定时同步/run_script.sh 请求系部信息API >> /Users/wuzilong/work/00code/hzdyjs_xg/超星数据移植与定时同步/logs/cron_请求系部信息API.log 2>&1
- # 第二个脚本:专业信息(每天00:05执行)
- 5 0 * * * /bin/bash /Users/wuzilong/work/00code/hzdyjs_xg/超星数据移植与定时同步/run_script.sh 请求专业信息API >> /Users/wuzilong/work/00code/hzdyjs_xg/超星数据移植与定时同步/logs/cron_请求专业信息API.log 2>&1
- # 第三个脚本:班级信息(每天00:10执行)
- 10 0 * * * /bin/bash /Users/wuzilong/work/00code/hzdyjs_xg/超星数据移植与定时同步/run_script.sh 请求班级信息API >> /Users/wuzilong/work/00code/hzdyjs_xg/超星数据移植与定时同步/logs/cron_请求班级信息API.log 2>&1
- # 第四个脚本:学生信息(每天00:15执行)
- 15 0 * * * /bin/bash /Users/wuzilong/work/00code/hzdyjs_xg/超星数据移植与定时同步/run_script.sh 请求学生信息API >> /Users/wuzilong/work/00code/hzdyjs_xg/超星数据移植与定时同步/logs/cron_请求学生信息API.log 2>&1
- # 第五个脚本:学籍异动信息(每天00:20执行)
- 20 0 * * * /bin/bash /Users/wuzilong/work/00code/hzdyjs_xg/超星数据移植与定时同步/run_script.sh 请求学籍异动信息API >> /Users/wuzilong/work/00code/hzdyjs_xg/超星数据移植与定时同步/logs/cron_请求学籍异动信息API.log 2>&1
- # ============================================
- # 安装说明:
- # 1. 确保 run_script.sh 有执行权限:
- # chmod +x /Users/wuzilong/work/00code/hzdyjs_xg/超星数据移植与定时同步/run_script.sh
- #
- # 2. 安装crontab配置:
- # crontab /Users/wuzilong/work/00code/hzdyjs_xg/超星数据移植与定时同步/crontab_config.txt
- #
- # 3. 查看当前crontab任务:
- # crontab -l
- #
- # 4. 编辑crontab任务:
- # crontab -e
- #
- # 5. 删除所有crontab任务:
- # crontab -r
- # ============================================
|