linux crontab 定时器

crontab -e 编辑定时器

crontab -l 显示当前定时器

crontab -r 删除当前定时器

格式

* * * * * command

第一列表示分钟1-59

第二列表示小时1-23

第三列表示日期1-31

第四列表示月份1-12

第五列表示星期0-6

第六列是要运行的命令

例如

crontab -e

* * * * * /Users/liuaopu/testCrontab/test.sh

保存会出现 installing new crontab

定时器会启动每分钟运行一次test.sh

猜你喜欢

转载自www.cnblogs.com/laphome/p/9230176.html