Click here to Skip to main content
14,430,522 members
Rate this:
Please Sign up or sign in to vote.
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.com 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.
Posted

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

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();


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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100