如何使用石英每隔70分钟发射一次cron调度程序?

编程入门 行业动态 更新时间:2024-10-27 13:27:15
本文介绍了如何使用石英每隔70分钟发射一次cron调度程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要每隔70分钟发一次cron时间表。例如,如果一个人在中午12:00开火,那么第二个应该是下午1:10,第三个应该是下午2:20,依此类推。我该如何实现这一目标? Cronmaker建议这样,0 0/70 * 1/1 *? * 但是当它超过60分钟时,它每小时才会发射一次。不是超过60的指定分钟。请建议。

I need to fire a cron schedule every 70th minute. For example if one fired at 12:00pm then 2nd one should be at 1:10pm and 3rd one should be at 2:20pm and so on. How do I achieve this? Cronmaker suggests this, 0 0/70 * 1/1 * ? * But when it goes past 60 minutes, it only fires every hour. Not the specfied minute which is above 60. Please advice.

推荐答案

每70分钟 - 这不是一个适合cron触发器的工作 - 间隔/简单触发器怎么样 every 70 minutes - that's not really a job suitable to cron triggers - how about an Interval/Simple Trigger trigger = TriggerBuilder.Create() .WithIdentity("your-trigger", "your-group") .WithSimpleSchedule(x => x .WithIntervalInMinutes(70) .RepeatForever()) .Build();

(你可能需要) /想要一个.EndAt()子句)

(you might need/want a .EndAt() clause as well)

更多推荐

如何使用石英每隔70分钟发射一次cron调度程序?

本文发布于:2023-08-01 18:37:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1270677.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:每隔   如何使用   程序   石英   cron

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!