Once inside the editor, you will want to refer to the fields above
in order to schedule a cron job for the appropriate time. Here are some
examples:
*/5 * * * * /home/adam/script.sh will execute script.sh every 5 minutes. This will set crontab every 5 minutes.
59 23 * * 1-5 /home/adam/script.sh will execute script.sh every day, monday through friday, at 11:59 p.m.
0 0 * * 0 /home/adam/script.sh will execute script.sh once a week. You could also specify @weekly instead of 0 0 * * 0.
0 23 1 * * /home/adam/script.sh will execute script.sh once a month, on the first, at 11:00 PM. You could also specify @monthly in place of 0 23 1 * *.
posted on 2009-03-10 15:42
Blog of JoJo 阅读(168)
评论(0) 编辑 收藏 所属分类:
Linux 技术相关