I use FluentSchedulerand have a registry class,
public class UnreadAlertRegistry : Registry
{
public UnreadAlertRegistry(int minute, string user, bool? type)
{
var alertAction = new Action(() =>
{
}
Schedule(alertAction).ToRunEvery(minute).Minutes();
}
}
and in the application, I initialize it.
alert = new UnreadAlertRegistry(5, _dashboardUser, false);
TaskManager.Initialize(alert);
It starts every 5 minutes.
I want to stop this. How to stop this scheduler?
source
share