crontab時間設定 - Linux
By Ursula
at 2013-01-24T17:20
at 2013-01-24T17:20
Table of Contents
You can try this one.
* 9-13/1 * * * Shell_Command
Man 5 crontabl for more detial
$> man 5 crontab
EXAMPLE CRON FILE
# use /bin/sh to run commands, no matter what /etc/passwd says
SHELL=/bin/sh
# mail any output to `paul', no matter whose crontab this is
MAILTO=paul
#
# run five minutes after midnight, every day
5 0 * * * $HOME/bin/daily.job >> $HOME/tmp/out 2>&1
# run at 2:15pm on the first of every month -- output mailed to paul
15 14 1 * * $HOME/bin/monthly
# run at 10 pm on weekdays, annoy Joe
0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?%
23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ...,
everyday"
5 4 * * sun echo "run at 5 after 4 every sunday"
※ 引述《leepair (leepair)》之銘言:
: 大家好
: 最近想要設一個crontab,但要設的時間點有點問題~
: 想設的時間點是: 早上九點到中午一點半,每一小時執行一次
: 請問有辨法用一行就可以設定嗎?
--
* 9-13/1 * * * Shell_Command
Man 5 crontabl for more detial
$> man 5 crontab
EXAMPLE CRON FILE
# use /bin/sh to run commands, no matter what /etc/passwd says
SHELL=/bin/sh
# mail any output to `paul', no matter whose crontab this is
MAILTO=paul
#
# run five minutes after midnight, every day
5 0 * * * $HOME/bin/daily.job >> $HOME/tmp/out 2>&1
# run at 2:15pm on the first of every month -- output mailed to paul
15 14 1 * * $HOME/bin/monthly
# run at 10 pm on weekdays, annoy Joe
0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?%
23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ...,
everyday"
5 4 * * sun echo "run at 5 after 4 every sunday"
※ 引述《leepair (leepair)》之銘言:
: 大家好
: 最近想要設一個crontab,但要設的時間點有點問題~
: 想設的時間點是: 早上九點到中午一點半,每一小時執行一次
: 請問有辨法用一行就可以設定嗎?
--
Tags:
Linux
All Comments
Related Posts
crontab時間設定
By Doris
at 2013-01-24T16:15
at 2013-01-24T16:15
xrdp無法安裝?
By Ula
at 2013-01-24T14:25
at 2013-01-24T14:25
系統無法更新
By Harry
at 2013-01-23T22:06
at 2013-01-23T22:06
只有C槽,還可以開機雙系統?
By Zora
at 2013-01-23T21:11
at 2013-01-23T21:11
ext2 block group概念問題
By Edwina
at 2013-01-23T14:49
at 2013-01-23T14:49