I am using FluentScheduler
, and have a Registry class,
public class UnreadAlertRegistry : Registry
{
public UnreadAlertRegistry(int minute, string user, bool? type)
{
var alertAction = new Action(() =>
{
// show message box
}
Schedule(alertAction).ToRunEvery(minute).Minutes();
}
}
and in app, i Initialize it.
alert = new UnreadAlertRegistry(5, _dashboardUser, false);
TaskManager.Initialize(alert);
it is run every 5 minute.
I want to stop this. How do i stop this Scheduler?