每天的下午4点、5点、6点的5 min、15 min、25 min、35 min、45 min、55 min时执行命令。 5,15,25,35,45,55 16,17,18 * * * command 每周一,三,五的下午3:00系统进入维护状态,重新启动系统。 00 15 * * 1,3,5 shutdown -r +5 每小时的10分,40分执行用户目录下的innd/bbslin这个指令: 10...
# record the memory usage of the system every monday # at 3:30AM in the file /tmp/meminfo 30 3 * * mon cat /proc/meminfo >> /tmp/meminfo # run custom script the first day of every month at 4:10AM 10 4 1 * * /root/scripts/backup.sh 1. 2. 3. 4. 5. 例 37-1. c...
# record the memory usage of the system every monday # at 3:30AM in the file /tmp/meminfo 30 3 * * mon cat /proc/meminfo >> /tmp/meminfo # run custom script the first day of every month at 4:10AM 10 4 1 * * /root/scripts/backup.sh 例37-1. crontab 的例子 根用户以外的用...
# (put your own initials here)echo the date to the console every # 15minutes between 6pm and 6am 0,15,30,45 18-06 * * * /bin/echo ‘date’ > /dev/console 保存并退出。确信前面5个域用空格分隔。 在 上面的例子中,系统将每隔1 5分钟向控制台输出一次当前时间。如果系统崩溃或挂起,从最后...
# run custom scrīpt the first day of every month at 4:10AM 10 4 1 * * /root/scrīpts/backup.sh 除了root用户之外的用户可以执行crontab配置计划任务。所实用户定义的crontab存储在目录/var/spool/cron下,任务会以创建者的身份被执行。要以特定用户创建一个crontab,先以该用户登录,执行命令crontab -e,...
#Run the‘atrun’program every minutes #This runs anything that’s due to run from‘at’.See man‘at’or‘atrun’. 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/lib/atrun 40 7 * * * updatedb 8,10,22,30,39,46,54,58 * * * * /bin/sync 进程的挂起及恢复命令bg、...
# (put your own initials here)echo the date to the console every # 15minutes between 6pm and 6am 0,15,30,45 18-06 * * * /bin/echo ‘date’ > /dev/console 保存并退出。确信前面5个域用空格分隔。 在 上面的例子中,系统将每隔1 5分钟向控制台输出一次当前时间。如果系统崩溃或挂起,从最后...
#Run the ‘atrun’ program every minutes #This runs anything that’s due to run from ‘at’.See man ‘at’ or ‘atrun’. 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/lib/atrun 40 7 * * * updatedb 8,10,22,30,39,46,54,58 * * * * /bin/sync...
13、xpire.1st$#62;$#62;mm.txt例14 我们来看一个超级用户的crontab文件:#Run the atrun program every minutes#This runs anything thats due to run from at.See man at or atrun.0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/lib/atrun40 7 * * * updatedb8,10,22,30,39,46...
这就是表示任意天任意月,其实就是每天的下午4点、5点、6点的5 min、15 min、25 min、35 min、45 min、55 min时执行命令。 [例9] 在每周一,三,五的下午3:00系统进入维护状态,重新启动系统。那么在crontab 文件中就应该写入如下字段: 00 15 * * 1,3,5 shutdown -r +5 ...