Results 1 to 2 of 2
Hi Everybody,
How to schedule a job using cron that shouldn't run between working hrs 9am-5pm, while run in non working hrs every hour, every day of the month, month ...
- 08-12-2010 #1Just Joined!
- Join Date
- Aug 2010
- Posts
- 6
Help with cronjob scheduling
Hi Everybody,
How to schedule a job using cron that shouldn't run between working hrs 9am-5pm, while run in non working hrs every hour, every day of the month, month & week.
I tried the following way, not sure I can use logical not operator(!). Please correct me if wrong or suggest other ways which might be better.
crontab -e
0 !9-17 * * * /path/to/script/file
I guess other way is
0 17-8 * * * /path/to/script/file
Thank you in advance
- 08-13-2010 #2Just Joined!
- Join Date
- May 2008
- Location
- Bangalore, India
- Posts
- 24
Hi
you can use the otherway, modify it to
Code:0 17-23,0-8 * * * /path/to/script/file


Reply With Quote