darrenmc
darrenmc

Reputation: 1781

Cron expression that starts at 1am and runs every 10 minutes on weekdays

I currently have a Quartz cron trigger that runs every 10 minutes Monday to Friday with this expression:

0 0/10 * ? * Mon-Fri

I am looking for a way to start the schedule from 1am on Monday and then run it every 10 minutes for the remainder of the week. Is this possible with a single cron expression?

An expression such as 0 0/10 1-23 ? * Mon-Fri would start at 1am but not run between 12 midight and 1am on subequent days, which is not what I need.

Upvotes: 1

Views: 5553

Answers (2)

Gilbert Le Blanc
Gilbert Le Blanc

Reputation: 51445

I'm not an expert on Quartz, but couldn't you schedule your job twice?

0 0/10 1-23 ? * Mon
0 0/10 * ? * Tue-Fri

Upvotes: 1

roger_that
roger_that

Reputation: 9791

The cron expression you told works fine i guess. You can verify it here http://www.cronmaker.com/ by entering your cron expression 0 0/10 * ? * Mon-Fri and check the next schedule.

Upvotes: 0

Related Questions