crontab命令常见于Unix和类Unix的操作系统之中,用于设置周期性被执行的指令。该命令从标准输入设备读取指令,并将其存放于“crontab”文件中,以供之后读取和执行。
需求:
CentOS服务器,每天下午6点定时关机。
设置:
编辑定时任务列表
# crontab -e
添加18:00定时关机任务
0 18 * * * poweroff
列出定时任务
# crontab -l
Ubuntu自动定时关机的方法:http://www.linuxdiyf.com/linux/8805.html
Ubuntu定时关机软件EasyShutdown:http://www.linuxdiyf.com/linux/7092.html
qshutdown:简易的定时关机、重启、挂起的工具:http://www.linuxdiyf.com/linux/5116.html
实现Ubuntu每天定时关机:http://www.linuxdiyf.com/linux/698.html