C# Class Nortal.Utilities.TaskSchedulerEngine.SchedulerEngineBase

The core of task scheduling - finds tasks, builds schedule, executes tasks by schedule.
Mostrar archivo Open project: nortal/Utilities.TaskSchedulerEngine Class Usage Examples

Private Properties

Property Type Description
BuildDefaultName string
GetNextTaskToRun ScheduledTaskWrapper
Initialize void
MakeRound void
ReportSchedule void

Public Methods

Method Description
RequestStop ( ) : void

Notifies the engine to stop running as soon as its safe to do so (finishes the task currently executing).

Run ( ) : void

Runs the engine and starts executing tasks by configured schedule. Does not return until RequestStop() is called by another thread.

RunInSeparateThread ( ) : Thread

Starts to schedule and execute the tasks in background thread.

SchedulerEngineBase ( ) : System
SchedulerEngineBase ( String name, ISchedulerEngineLogger logger ) : System

Protected Methods

Method Description
InitializeTasks ( ) : IEnumerable

Initialize tasks to execute.

Private Methods

Method Description
BuildDefaultName ( ) : string
GetNextTaskToRun ( ) : ScheduledTaskWrapper
Initialize ( ) : void

Sets up service, resets tasks and their configuration.

MakeRound ( ) : void

Engine execution step - waits a configured time (pollInterval) or executes a task.

ReportSchedule ( ) : void

Method Details

InitializeTasks() protected abstract method

Initialize tasks to execute.
protected abstract InitializeTasks ( ) : IEnumerable
return IEnumerable

RequestStop() public method

Notifies the engine to stop running as soon as its safe to do so (finishes the task currently executing).
public RequestStop ( ) : void
return void

Run() public method

Runs the engine and starts executing tasks by configured schedule. Does not return until RequestStop() is called by another thread.
public Run ( ) : void
return void

RunInSeparateThread() public method

Starts to schedule and execute the tasks in background thread.
public RunInSeparateThread ( ) : Thread
return Thread

SchedulerEngineBase() public method

public SchedulerEngineBase ( ) : System
return System

SchedulerEngineBase() public method

public SchedulerEngineBase ( String name, ISchedulerEngineLogger logger ) : System
name String
logger ISchedulerEngineLogger If not set then initialized to CsvSchedulerEngineLogger
return System