FluentScheduler icon indicating copy to clipboard operation
FluentScheduler copied to clipboard

Question I have about scheduling.

Open Rpgdudester opened this issue 2 years ago • 1 comments

Hello and good morning!

I love fluentScheduler and how everything works well for what I'm using it for with scheduling certain tasks to run in c# so thanks for that!

I have 2 questions.

  1. Is this code still active and is it actively being developed?
  2. Is there a way, to schedule a method to run every weekday at say 9 AM and run every hour in that day between 9 AM and 8 PM?

This is my current code setup so far which works but I need to take it a step further and not sure how:

JobManager.AddJob(() => LabResultsEcomUpdater(1), (s) => s.ToRunOnceAt(09,00).AndEvery(1).Hours().Between(09, 00, 20, 00));

would this stop the code running after 8PM or would it start up again the next day, and how would i modify it to run every week day at 9 AM and every hour between 09 and 20 and making sure it starts up again the next day?

Thanks for the awesome code base! :)

-Joshua

Rpgdudester avatar Aug 29 '22 14:08 Rpgdudester

you should be able to define it as a cron expression... https://crontab.guru/#0_8-21___1-5 was my idea, but i am stupid, so there is probably a better way to get it to the every h... at min 0 looks a bit sketchy...

ExtraTNT avatar Dec 13 '22 14:12 ExtraTNT