public RunSingleJobContinuously ( string jobName ) : void | ||
jobName | string | |
Résultat | void |
public static void Execute(string jobName, bool continuous, IDictionary <string, string> overrideSettings) { // Create the settings manager var settings = new Settings(overrideSettings); var worker = new WorkerRole(settings); // See which mode we're in if (String.IsNullOrWhiteSpace(jobName)) { // Run ALL THE JOBS! worker.OnStart(); worker.Run(); Console.WriteLine("Worker is running. Press ENTER to stop"); Console.ReadLine(); worker.Stop(); worker.OnStop(); } else { // Run JUST ONE JOB! if (!continuous) { worker.RunSingleJob(jobName); } else { worker.RunSingleJobContinuously(jobName); } } }
public static void Execute(string jobName, bool continuous, IDictionary<string, string> overrideSettings) { // Create the settings manager var settings = new Settings(overrideSettings); var worker = new WorkerRole(settings); // See which mode we're in if (String.IsNullOrWhiteSpace(jobName)) { // Run ALL THE JOBS! worker.OnStart(); worker.Run(); Console.WriteLine("Worker is running. Press ENTER to stop"); Console.ReadLine(); worker.Stop(); worker.OnStop(); } else { // Run JUST ONE JOB! if (!continuous) { worker.RunSingleJob(jobName); } else { worker.RunSingleJobContinuously(jobName); } } }