问题标签 [crontrigger]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1323 浏览

java - java Quartz2 cron触发器没有立即触发

当我调用调度程序时,我需要立即执行调度程序,下次它将根据 cron 表达式执行。但是在这里我的代码仅在 10 分钟后执行,但在我运行此类/应用程序时未执行。

QuartzConfigure.java用于注册和调用执行方法:

QuartzSchduleJob.java用于工作:

0 投票
1 回答
49 浏览

cron - 设置 Cron 作业

我有要求说我需要将 cron 设置为每天从周一到周四两次运行,即晚上 10 点和下午 5 点。同样的工作也应该在周五下午 5 点和周日晚上 10 点运行

对于要求的第一部分,我设置为“0 22 * * 1-4”但是我如何设置第二个要求呢?

我需要设置为单个 cron 行。请帮助/建议。

0 投票
1 回答
7470 浏览

cron - Unable to store Trigger with name: 'trigger1' and group: 'group1', because one already exists with this identification

Referring delete trigger in quartz

I am getting the same issue: Unable to store Trigger with name: 'schedulerJobTrigger' and group: 'group1', because one already exists with this identification.

So before I think of unscheduling the Job I have a Query:

Say I have 2 jobs.. details as follows: Job1 : Start Time Today @ 17:30 and repeat twice after every 5 minutes Job 2 :Start Time Today @ 17:37

So if I unschedule a job(which supposedly removes the Trigger) after it executed at 17:30 and execute the Job2 then how will the scheduler run the Job1 which needs to be run @17:35 and 17:40 respectively(that's the repetitions)

Thanks, Please help!

Before trying the above scenario, even if I schedule a new job with a different schedule @ scheduler.scheduleJob(job, trigger); it gives me the exception: Unable to store Trigger with name: 'schedulerJobTrigger' and group: 'group1', because one already exists with this identification.

0 投票
1 回答
39 浏览

sql - 设置 cron,当安装闪存驱动器时,将文件(sql)写入其中

我正在使用 cron 创建我的数据库备份文件。

我想知道我是否可以设置它,当安装闪存驱动器(我认为驱动器应该具有特定名称)时,sql文件将自动写入其中。

0 投票
1 回答
950 浏览

cron - 在特定秒内每 5 分钟运行一次脚本

我想每天运行一个脚本,在 09:00 到 22:00 之间的小时:分钟:20 秒每 5 分钟运行一次

我知道如何在这些小时和每 5 分钟之间配置 cron 作业,但在小时:分钟:20 秒运行它非常重要......

有没有办法做到这一点?

0 投票
1 回答
332 浏览

cron - 同时创建日期和月份的 Cron 表达式

我只是想创建一个将在“N”天后执行作业的 cron 表达式。其中 N 可以是大于零的任何数字。

因此,如果数字介于 1 和 30 之间,则可以。例如,在每 25 天上午 11 点执行作业的 Cron 表达式将是:

但如果用户超过此限制,则意味着我们将不得不在“M”个月和“D”天后执行作业。

我无法理解如何同时指定日期和月份。谁能让我理解如何为这种情况创建 cron 表达式。您可以假设工作在每 '65' 天后执行

谢谢你的时间。

0 投票
0 回答
170 浏览

cron - 作业在特定月数和天数后运行的 Cron 表达式

我正在研究 grails 应用程序中的石英插件。我想为要在指定天数后安排的作业创建一个 Cron 表达式。但是天数可以大于 30,这意味着在这种情况下,作业将安排在每个“M”个月和“D”天之后。

我无法为此用例创建 Cron 表达式,因为我认为我需要指定天数和月数。对此有什么可能的 Cron 表达式?如何安排作业在特定天数后执行,并且天数可以大于零。

谢谢你的时间。

0 投票
2 回答
57 浏览

linux - cron 执行错误

在 crontab 上设置了下面的行。但不是验证当天。当我删除星期几时正确执行。有什么建议吗?

0 投票
1 回答
817 浏览

c# - 如何在quartz.net 中编辑已经存在的cron 计划?

我有这个要求,可以在以后编辑之前创建的时间表。目前我正在做的是我正在删除以前的时间表并创建一个新的。但是这样一来,开始时间就出问题了。由于计划开始时间是过去的日期,因此计划不会触发。即使我将现有的开始时间增加到未来的某个时间,时间表仍然不会触发。拥有允许用户编辑现有时间表的功能的最佳方式是什么?请指教。

0 投票
1 回答
662 浏览

c# - Quartz.net - crontrigger for specific days

I coded a Crontrigger to work for 2 specific days... 14 and 28 of each month. It´s working at the specified time(11:55 pm) but works for every single day :S

If you have an idea why is this happening please I'll appreciate it, I´ve been testing a lot of expressions for the .WithCronSchedule parameter.