c# - How to stop a task of FluentScheduler? -


i using fluentscheduler, , have 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, initialize it.

alert = new unreadalertregistry(5, _dashboarduser, false); taskmanager.initialize(alert); 

it run every 5 minute.

i want stop this. how stop scheduler?

i set name schedule.

schedule(alertaction).withname("unreadalertregistry").torunevery(minute).minutes(); 

and stop , use removetask

taskmanager.removetask("unreadalertregistry"); 

Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -