Quartz start at a specific time and run at specific interval

陌路散爱 提交于 2019-12-23 02:53:39

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!