I am thinking that there is a function / method for creating jobs that random time Triggered on This means that if I set a cron schedule on every Monday at 10.00 am and gives a time interval, then 30 minutes, the trigger will always be 9.30 ~ 10.30 away. For example, this is a cron schedule
schedule.CidronSadubleables ("0 10? * Mon"); Triggers = new Triggers () .Indentity (Trigger ID) .startNow () // & lt; ~~~~~~~~~~~~~~~ ??? .details (schedule .getCronSchedule ()) .withSchedule (CronShedule (schedule .getCronSchedule ()). Build ();
If I have a variable with a specific category in minutes, can I set it to trigger randomly? And by this I meant that not to take the cron schedule strings and rebuild it, but using a method to trigger the event each time depending on the random range, so the first Monday on 10.01 seconds triggers on Monday Can be triggered, can be triggered at 9.46 and etc.
Thanks in advance.
Some time schedules between 1.00am and 1.30am every day, you can try it Are:
schedule. SetcronSableLabel (string format ("0% d 1am * *?", Random.nextInt (30)));
Unfortunately there is nothing in quartz, or there is also no unix cron for that matter. And randomness is going to happen this way every day, unless you do not reschedule the schedule regularly. But maybe this is not a problem for your situation.
No comments:
Post a Comment