linux定时任务crontab
发布: 2019-05-06 12:22:25标签: linux
定时任务编辑
01# 会使用vim打开编辑页面02crontab -e03# 查看用户定时任务04crontab -l05# 查看定时任务日志06tail -f /var/log/cron
复制代码01# 打开编辑页面02# .---------------- minute (0 - 59)03# | .------------- hour (0 - 23)04# | | .---------- day of month (1 - 31)05# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...06# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat07# | | | | |08# * * * * * command to be executed
复制代码例子
01# 每分钟刷新接口数据020 7 * * * curl "https://www.luzhongkuan.cn/api/todayEnglish" >> /root/a.log 2>&1 &
复制代码