简体   繁体   English

每小时以外的30分钟后每隔30分钟便会显示一次Java Quartz Scheduler cron表达式

[英]java Quartz Scheduler cron expression for every after 30 minutes quarter past the hours

I know how to run a job at every 30 minutes is by using following cron expression: 我知道如何每隔30分钟运行一次工作,是使用以下cron表达式:

0 0/30 * * * ?

It runs the job at every 30 minutes like :: 它每30分钟运行一次作业,如::

10:30, 11, 11:30, 12.

I want to make it run every after 30 minutes quarter past the hours like:: 我想让它每隔30分钟每隔30分钟运行一次,例如:

10:15, 10:45, 11:15, 11:45.

How do I make it run every after 30 minutes quarter past the hours as explained above? 我如何使其每隔30分钟每隔30分钟运行一次,如上所述?

UPDATE :: I have seen that link. 更新::我已经看到了该链接。 The solution stated in the given link is not working. 给定链接中所述的解决方案不起作用。 It started cron job at quarter past hour but It is running on every second of the minute like 15:15:00, 15:15:01, 15:15:02..... 它在过去的一刻钟开始了cron工作,但它每分钟运行一次,例如15:15:00、15:15:01、15:15:02 .....

Thanks 谢谢

Just give it a minute value of 15,45 只要给它一分钟值15,45

as in

0 15,45 * * * ? *

see www.cronmaker.com 参见www.cronmaker.com

试试这个15表示开始时间:

0 15/30 * * * ?

Another variant of the answers already provided is: 已经提供的答案的另一种形式是:

0 15-45/30 * * * ?

Which when tested with CronMaker gave me the below results (Note the different start times): 使用CronMaker进行测试后, 得出以下结果(请注意不同的开始时间):

在此处输入图片说明 在此处输入图片说明

As you've had some issues with the other cron expressions, I scheduled a job with the above and it has been running fine 由于其他cron表达式存在一些问题,因此我安排了上述工作,并且运行良好

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM