问题
I have been trying to come up with a cron expression to start a job at 8.30am and run every 30 mins until midnight and restart at 8.30am next day. I came up with following expression but only thing it lacks is starting at 8.30am. Rather than starting at 8.30 it starts at 8.00.
0 0/30 8/1 * * ?
Is it even possible to do what I'm trying to do? I'll be using java quartz2.x.x
回答1:
It seems to be not possible in single expression. There is good link, to create your cron expression, you may refer Cron Maker
==Updated==
You can have two cron expression
0 30/30 8 ? * * * //every day 8:30
And,
0 0/30 9-23 * * ? // every 30 min starts from 9:00
来源:https://stackoverflow.com/questions/42966927/quartz-start-at-a-specific-time-and-run-at-specific-interval