jamesmh / coravel

Near-zero config .NET library that makes advanced application features like Task Scheduling, Caching, Queuing, Event Broadcasting, and more a breeze!
https://docs.coravel.net/Installation/
MIT License
3.65k stars 243 forks source link

Add support to TimeSpan #296

Closed pedrohenriquebr closed 1 year ago

pedrohenriquebr commented 2 years ago

Describe the solution you'd like I would like to pass a TimeSpan instance to schedule each invocable. Actually I want pass custom seconds for the period inside of TimeSpan.

Describe alternatives you've considered I tried a function helper that converts TimeSpan into a cron string expression, but not solved my issue because I need the seconds parameter.

jamesmh commented 1 year ago

While TimeSpan is one way, ultimately using cron is industry standard. I'd need a really solid reason to want to add TimeSpan support vs. just using cron (other than the need for seconds).

Some forms of cron do support seconds... I'm assuming that using the EverySeconds(3) method is not meeting your needs?

What specifically are you trying to do?