linux的触发计划认为的方法
操作
1,linux 中的计划任务是由crontab 来设置的,具体格式如下:
.---------------- minute (0 - 59)
| .------------- hour (0 - 23)
| | .---------- day of month (1 - 31)
| | | .------- month (1 - 12) OR jan,feb,mar,apr ...
| | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
| | | | |
* * * * * 解释程序 脚本
2,查看计划任务
crontab -l
3,添加或编辑计划任务
crontab -e
进去后是vi编辑模式。
4,例子
每五分钟执行一次
*/5 * * * * /alidata/server/php/bin/php /alidata/www/sharp/inc/crontab/auto_crontab.php