public class ScheduleManager : IDisposable,
IProvideStatusPublic Class ScheduleManager
Implements IDisposable, IProvideStatuspublic ref class ScheduleManager : IDisposable,
IProvideStatusGemstone.Scheduling.ScheduleManager = function();
Type.createClass(
'Gemstone.Scheduling.ScheduleManager',
null,
IDisposable,
Gemstone.IProvideStatus);
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));
}
}
| ScheduleManager | Initializes a new instance of the ScheduleManager class. |
| 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. |
| 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. |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Finalize | Allows 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. |
| GetHashCode | Serves as the default hash function. (Inherited from Object) |
| GetType | Gets the Type of the current instance. (Inherited from Object) |
| MemberwiseClone | Creates 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. |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
| 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. |
| 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) |