浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

crontab - jojo's blog--快乐忧伤都与你同在 - BlogJava

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 2012-12-03 13:58  lexus  阅读(154)  评论(0编辑  收藏  举报