Quartz Cron表达式:每15天运行一次,即每月运行两次 [英] Quartz Cron expression :Run every 15 days ie twice in a month

查看:1618
本文介绍了Quartz Cron表达式:每15天运行一次,即每月运行两次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为调度程序设置一个石英cron表达式,该表达式将每15天触发一次,例如每月的1号和15号。015 10 15 *吗?仅在每个
月的15号触发。

I want to set the scheduler with a quartz cron expression which will trigger every 15 days ,for example 1st and 15th of every month.The 0 15 10 15 * ? is triggering only on 15th of every month.

推荐答案

我已经对此进行了测试,以下表达式可以正常工作

I have tested this and the following expression works fine

        "0 0 0 1,15 * ?"

1,15语句在每月00:00的每月1号和15号触发触发器。
您可以更改前三个零以在特定时间触发它们。

the 1,15 statement fires triggers on 1st and 15th of every month at 00:00 hours. You can change the first three zeroes to fire them at a particular time you want.

第一个零->秒

第二个零->分钟

第三个零->小时

这篇关于Quartz Cron表达式:每15天运行一次,即每月运行两次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆