ScheduleManager Class

Monitors multiple Schedule at an interval of one minute to check if they are due.

Definition

Namespace: Gemstone.Scheduling
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.167 -- Release Build+1e132a4d484f1823d39b71639f55ad9da4974e99
public class ScheduleManager : IDisposable, 
	IProvideStatus
Inheritance
Object    ScheduleManager
Implements
IProvideStatus, IDisposable

Example

This example shows how to use the ScheduleManager component: using System; using Gemstone; using Gemstone.Scheduling; class Program { static void Main(string[] args) { ScheduleManager scheduler = new ScheduleManager(); // Add event handlers. scheduler.Starting += scheduler_Starting; scheduler.Started += scheduler_Started; scheduler.ScheduleDue += scheduler_ScheduleDue; // Add test schedules. scheduler.AddSchedule("Run.Notepad", "* * * * *"); scheduler.AddSchedule("Run.Explorer", "* * * * *"); // Start the scheduler. scheduler.Start(); Console.ReadLine(); } static void scheduler_Started(object? sender, EventArgs e) { Console.WriteLine("Scheduler has started successfully."); } static void scheduler_Starting(object? sender, EventArgs e) { Console.WriteLine("Scheduler is waiting to be started."); } static void scheduler_ScheduleDue(object? sender, EventArgs;lt;Schedule> e) { Console.WriteLine(string.Format("{0} schedule is due for processing.", e.Argument.Name)); } }

Constructors

ScheduleManager Initializes a new instance of the ScheduleManager class.

Properties

Enabled Gets or sets a boolean value that indicates whether the ScheduleManager object is currently enabled.
IsRunning Gets a boolean value that indicates whether the ScheduleManager is running.
Name Gets or sets the name of the ScheduleManager.
Schedules Gets a list of all Schedule monitored by the ScheduleManager object.
Status Gets the descriptive status of the ScheduleManager.

Methods

AddSchedule Attempts to add a new Schedule.
CheckAllSchedules Checks all of the Schedules to determine if they are due.
Dispose Releases all the resources used by the ScheduleManager object.
Dispose(Boolean) Releases the unmanaged resources used by the ScheduleManager object and optionally releases the managed resources.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
FindSchedule Searches for the Schedule with the specified name.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
OnScheduleDue Raises the ScheduleDue event.
OnScheduleDueCheck Raises the ScheduleDueCheck event.
OnStarted Raises the Started event.
OnStarting Raises the Starting event.
RemoveSchedule Attempts to remove a Schedule with the specified name if one exists.
Start Starts the ScheduleManager asynchronously if not running.
Stop Stops the ScheduleManager if running.
ToStringReturns a string that represents the current object.
(Inherited from Object)

Events

ScheduleDue Occurs asynchronously when a Schedule is due according to the rule specified for it.
ScheduleDueCheck Occurs when the a particular Schedule is being checked to see if it is due.
Started Occurs when the ScheduleManager has started at the top of the minute.
Starting Occurs while the ScheduleManager is waiting to start at the top of the minute.

Extension Methods

GetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
GetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)

See Also