linux 下 crontab 命令用于定时执行特定任务。
语法如下:
crontab [-e [UserName]|-l [UserName]|-r [UserName]|-v [UserName]|File ]
编辑crontab文件。使用命令:crontab -e 中间增加如下行
#每月每天每小时的第 0 分钟执行一次 /bin/ls : 0 * * * * /bin/ls
图解如下