-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for the TimeSpan datatype #119
Comments
My current workaround: using System;
namespace FluentScheduler.Extensions
{
public static class FluentSchedulerExtensions
{
///Schedule a FluentScheduler Job using TimeSpan
public static SecondUnit ToRunEvery(this Schedule schedule, TimeSpan timespan)
{
var seconds = (int)Math.Ceiling(Math.Abs(timespan.TotalSeconds));
return schedule.ToRunEvery(seconds).Seconds();
}
}
} |
Yeah, I feel you, I had to do something similar one time. |
Has this already been implemented? I know it's been nearly 2 years, but I'd be interested to help! |
@puf17640 We did not implement that yet, however, I believe it would be a fine overload to implement in the new version of the library. See #214 |
Implemented this new feature in |
It would be nice if you could add the possibility to schedule jobs to run every
TimeSpan
usingSystem.TimeSpan
.For example
.ToRunEvery(timespan)
The text was updated successfully, but these errors were encountered: