“Every 1 day at 11:00 pm.” What is a Cron Job & Crontab? Acron jobis a scheduled task that is typically executed by the server in order to automate certain processes or tasks. For example, acron jobcould be set up to automatically backup a database every night at 2am. Acrontabis ...
Every cron job uses five fields. Here is an explanation of what each field does in this cron, which runs “every 1 day at 3:30 am“: Field 1: (30) indicates that the task will be run atminute30. Field 2: (3) indicates that the task will be run athour3 (3 am). Field 3: ...
at命令相当于另一个shell,运行at time命令时,它发送一个个命令,可以输入任意命令或者程序。 三、参数详解 at [-V] [-q x] [-f file] [-mldbv] time at -c job ... atq [-V] [-q x] atrm [-V] job ... 1. 2. 3. 4. -V : 印出版本编号 -q : 使用指定的伫列(Queue)来储...
# 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 scrīpt the first day of every month at 4:10AM 10 4 1 * * /root/scrīpts/backup.sh 除了root用户之外的用户可以执行crontab配置...
$crontab -l#(crondave installed on Tue May 4 13:07:43 1999)#DT:ech thedateto the console every 30 minites0,15,30,45 18-06 * * * /bin/echo `date` > /dev/tty1#DT:delete core files,at 3.30am on 1,7,14,21,26,26 days of each month30 3 1,7,14,21,26 * * /bin/find ...
#DT:ech the date to the console every 30 minites 0,15,30,45 18-06 * * * /bin/echo date > /dev/tty1 #DT:delete core files,at 3.30am on 1,7,14,21,26,26 days of each month 30 3 1,7,14,21,26 * * /bin/find -name “core’ -exec rm {} ; ...
# 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. crontab 的例子 根用户以外的用户可以使用 crontab 工具来配置 cron 任务。所有用户定义的 crontab 都被保存在 /var/spool/cron 目录中,并使用创建它们的用户...
# DT:ech the date to the console every 30 minites 0,15,30,45 18-06 * * * /bin/echo `date` /dev/tty1 # DT:delete core files,at 3.30am on 1,7,14,21,26,26 days of each month 30 3 1,7,14,21,26 * * /bin/find -name "core' -exec rm {...
day:表示日期,可以是从1到31之间的任何整数。 month:表示月份,可以是从1到12之间的任何整数。 week:表示星期几,可以是从0到7之间的任何整数,这里的0或7代表星期日。 command:要执行的命令,可以是系统命令,也可以是自己编写的脚本文件。 在以上各个字段中,还可以使用以下特殊字符: ...
# DT:ech the date to the console every 30 minites0,15,30,45 18-06 * * * /bin/echo `date` > /dev/tty1# DT:delete core files,at 3.30am on 1,7,14,21,26,26 days of each month30 3 1,7,14,21,26 * * /bin/find -name "core' -exec rm {} \; 4). 删除crontab文件要...