C# Class Yea.Scheduler.Model.Schedule

Mostra file Open project: OxPatient/Rule-Engine Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
Execute ( ) : void

Start the task now, regardless of any scheduled start time.

NonReentrant ( ) : Schedule

Will not start a new instance of the task if a previous schedule is still running

Schedule ( System.Action action ) : System

Schedules the specified task to run

Schedule ( ITask task ) : System

Schedules the specified task to run

ToRunEvery ( int interval ) : TimeUnit

Schedules the specified task to run for the specified interval

ToRunNow ( ) : SpecificRunTime

Schedules the specified task to run now

ToRunOnceAt ( System.DateTime time ) : SpecificRunTime

Schedules the specified task to run once at the time specified. If the time has passed, the task will be executed immediately.

ToRunOnceAt ( int hours, int minutes ) : SpecificRunTime

Schedules the specified task to run once at the hour and minute specified. If the hour and minute have passed, the task will be executed immediately.

WithName ( string name ) : Schedule

Provide a name for this schedule

Method Details

Execute() public method

Start the task now, regardless of any scheduled start time.
public Execute ( ) : void
return void

NonReentrant() public method

Will not start a new instance of the task if a previous schedule is still running
public NonReentrant ( ) : Schedule
return Schedule

Schedule() public method

Schedules the specified task to run
public Schedule ( System.Action action ) : System
action System.Action Task to run
return System

Schedule() public method

Schedules the specified task to run
public Schedule ( ITask task ) : System
task ITask Task to run
return System

ToRunEvery() public method

Schedules the specified task to run for the specified interval
public ToRunEvery ( int interval ) : TimeUnit
interval int
return TimeUnit

ToRunNow() public method

Schedules the specified task to run now
public ToRunNow ( ) : SpecificRunTime
return SpecificRunTime

ToRunOnceAt() public method

Schedules the specified task to run once at the time specified. If the time has passed, the task will be executed immediately.
public ToRunOnceAt ( System.DateTime time ) : SpecificRunTime
time System.DateTime Time to run the task
return SpecificRunTime

ToRunOnceAt() public method

Schedules the specified task to run once at the hour and minute specified. If the hour and minute have passed, the task will be executed immediately.
public ToRunOnceAt ( int hours, int minutes ) : SpecificRunTime
hours int 0-23: Represents the hour of today
minutes int 0-59: Represents the minute to run the task
return SpecificRunTime

WithName() public method

Provide a name for this schedule
public WithName ( string name ) : Schedule
name string Name of this schedule
return Schedule