i want to run a job every 10 minutes between 8:30 and 9:30 (which means run at 8:30, 8:40, …, 9:20)
can any one help me out?
is cron expressions supports time intervals ?
regards
karishma
i want to run a job every 10 minutes between 8:30 and 9:30 (which means run at 8:30, 8:40, …, 9:20)
can any one help me out?
is cron expressions supports time intervals ?
regards
karishma
Welcome @karishma_karish to nixCraft forum!
There is no simple way or regex for time such as 8:30 to 9:30. It is pretty easy for 8 to 9:
# Run at every 10th minute past every hour from 8 through 9
*/10 8-9 * * * /path/to/job
However, you can build logic as follows:
30 08 * * * /path/to/job
*/10 8-9 * * * /path/to/job
30 9 * * * /path/to/job
30 8 * * * /path/to/script
40 8 * * * /path/to/script
50 8 * * * /path/to/script
59 8 * * * /path/to/script
00 9 * * * /path/to/script
10 9 * * * /path/to/script
20 9 * * * /path/to/script
30 9 * * * /path/to/script
# start at 8:30,8:40,8:50
30,40,50 8 * * * /path/to/job
# start at 9:00,9:10,9:209:30
00,10,20,30 9 * * * /path/to/job
The fifth is a good choice. Let me know.