这个cron表达式是指每隔一个星期天吗? [英] Does this cron expression mean every other Sunday?

查看:409
本文介绍了这个cron表达式是指每隔一个星期天吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下cron表达式是否表示每隔一个星期执行一次?

Does the following cron expression mean "execute every other Sunday?"

0 0 3 ? * 2/1 *



我试图在Spring Quartz调度程序中使用它。

I'm trying to use it with the Spring Quartz scheduler.

推荐答案

您要询问的表达方式是星期一至星期六凌晨3点。从 Quartz Javadoc 你可以尝试使用两个表达式 0 0 3? * 1#1 * 0 0 3? * 1#3 * 在本月的第1和第3个星期日执行。 D#N 语法可让您选择当月的第N天D。

The expression you are asking about fires at 3 am Monday to Saturday. From the Quartz Javadoc you could try using the two expressions 0 0 3 ? * 1#1 * and 0 0 3 ? * 1#3 * to execute on the 1st and 3rd Sundays of the month. The D#N syntax lets you pick the Nth day D of the month.

这篇关于这个cron表达式是指每隔一个星期天吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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