C# Class R.Scheduler.Core.SchedulerCore

Provides abstraction layer between the Quartz Scheduler and the R.Scheduler controllers
Inheritance: ISchedulerCore
Show file Open project: R-Suite/R.Scheduler Class Usage Examples

Public Methods

Method Description
AddCronCalendar ( string name, string description, string cronExpression ) : System.Guid

Register new CronCalendar

AddHolidayCalendar ( string name, string description, IList daysExcludedUtc = null ) : System.Guid

Register new HolidayCalendar and optionally provide an initital set of dates to exclude.

AddHolidayCalendarExclusionDates ( System.Guid id, IList daysExcludedUtc ) : void

Add exclusion dates to HolidayCalendar

AmendCronCalendar ( System.Guid id, string description, string cronExpression ) : void

Amends existing CronCalendar

AmendHolidayCalendar ( System.Guid id, string description, IList datesExcluded ) : void

Amends existing HolidayCalendar. New datesExcluded set replaces the current set.

CreateJob ( string jobName, string jobGroup, Type jobType, object>.Dictionary dataMap, string description, System.Guid jobId = null ) : System.Guid

Create new job of type jobType without any triggers

DeleteCalendar ( System.Guid id ) : bool

Delete Calendar

ExecuteJob ( System.Guid jobId ) : void

Trigger the specified job

GetCalendar ( System.Guid id, string &name ) : ICalendar

Get Calendar

GetCalendars ( ) : IDictionary>

Get dictionary of ICalendar and (calendar) Name/Id pairs

GetFireTimesBetween ( System.DateTime start, System.DateTime end ) : IEnumerable

Get all the fire times within a specified date range

GetJobDetail ( System.Guid id ) : IJobDetail

Get IJobDetail of the job specified by id. This method is used mainly for requests coming from the WebApi.

GetJobDetails ( Type jobType = null ) : Guid>.IDictionary

Get job details of type jobType. Get all the job details if jobType is not specified

GetTriggersOfJob ( System.Guid id ) : Guid>.IDictionary

Get all triggers of a specified job

PauseTrigger ( System.Guid triggerId ) : void

Pause trigger from firing.

RemoveJob ( System.Guid jobId ) : void

Deletes the specified job and all the asociated triggers.

RemoveJobTriggers ( System.Guid jobId ) : void

Removes all triggers of the specified job

RemoveTrigger ( System.Guid triggerId ) : void

Remove trigger from scheduler.

ResumeTrigger ( System.Guid triggerId ) : void

Resume trigger from firing.

ScheduleTrigger ( BaseTrigger myTrigger ) : System.Guid

Schedule specified trigger

SchedulerCore ( IScheduler scheduler, IPersistanceStore persistanceStore ) : System

Method Details

AddCronCalendar() public method

Register new CronCalendar
public AddCronCalendar ( string name, string description, string cronExpression ) : System.Guid
name string
description string
cronExpression string
return System.Guid

AddHolidayCalendar() public method

Register new HolidayCalendar and optionally provide an initital set of dates to exclude.
public AddHolidayCalendar ( string name, string description, IList daysExcludedUtc = null ) : System.Guid
name string
description string
daysExcludedUtc IList
return System.Guid

AddHolidayCalendarExclusionDates() public method

Add exclusion dates to HolidayCalendar
public AddHolidayCalendarExclusionDates ( System.Guid id, IList daysExcludedUtc ) : void
id System.Guid
daysExcludedUtc IList
return void

AmendCronCalendar() public method

Amends existing CronCalendar
public AmendCronCalendar ( System.Guid id, string description, string cronExpression ) : void
id System.Guid
description string
cronExpression string
return void

AmendHolidayCalendar() public method

Amends existing HolidayCalendar. New datesExcluded set replaces the current set.
public AmendHolidayCalendar ( System.Guid id, string description, IList datesExcluded ) : void
id System.Guid
description string
datesExcluded IList
return void

CreateJob() public method

Create new job of type jobType without any triggers
public CreateJob ( string jobName, string jobGroup, Type jobType, object>.Dictionary dataMap, string description, System.Guid jobId = null ) : System.Guid
jobName string
jobGroup string
jobType System.Type
dataMap object>.Dictionary specific parameters
description string
jobId System.Guid
return System.Guid

DeleteCalendar() public method

Delete Calendar
public DeleteCalendar ( System.Guid id ) : bool
id System.Guid
return bool

ExecuteJob() public method

Trigger the specified job
public ExecuteJob ( System.Guid jobId ) : void
jobId System.Guid
return void

GetCalendar() public method

Get Calendar
public GetCalendar ( System.Guid id, string &name ) : ICalendar
id System.Guid
name string
return ICalendar

GetCalendars() public method

Get dictionary of ICalendar and (calendar) Name/Id pairs
public GetCalendars ( ) : IDictionary>
return IDictionary>

GetFireTimesBetween() public method

Get all the fire times within a specified date range
public GetFireTimesBetween ( System.DateTime start, System.DateTime end ) : IEnumerable
start System.DateTime
end System.DateTime
return IEnumerable

GetJobDetail() public method

Get IJobDetail of the job specified by id. This method is used mainly for requests coming from the WebApi.
public GetJobDetail ( System.Guid id ) : IJobDetail
id System.Guid
return IJobDetail

GetJobDetails() public method

Get job details of type jobType. Get all the job details if jobType is not specified
public GetJobDetails ( Type jobType = null ) : Guid>.IDictionary
jobType System.Type
return Guid>.IDictionary

GetTriggersOfJob() public method

Get all triggers of a specified job
public GetTriggersOfJob ( System.Guid id ) : Guid>.IDictionary
id System.Guid
return Guid>.IDictionary

PauseTrigger() public method

Pause trigger from firing.
public PauseTrigger ( System.Guid triggerId ) : void
triggerId System.Guid
return void

RemoveJob() public method

Deletes the specified job and all the asociated triggers.
public RemoveJob ( System.Guid jobId ) : void
jobId System.Guid
return void

RemoveJobTriggers() public method

Removes all triggers of the specified job
public RemoveJobTriggers ( System.Guid jobId ) : void
jobId System.Guid
return void

RemoveTrigger() public method

Remove trigger from scheduler.
public RemoveTrigger ( System.Guid triggerId ) : void
triggerId System.Guid
return void

ResumeTrigger() public method

Resume trigger from firing.
public ResumeTrigger ( System.Guid triggerId ) : void
triggerId System.Guid
return void

ScheduleTrigger() public method

Schedule specified trigger
public ScheduleTrigger ( BaseTrigger myTrigger ) : System.Guid
myTrigger R.Scheduler.Contracts.Model.BaseTrigger
return System.Guid

SchedulerCore() public method

public SchedulerCore ( IScheduler scheduler, IPersistanceStore persistanceStore ) : System
scheduler IScheduler
persistanceStore IPersistanceStore
return System