[This is preliminary documentation and is subject to change.]
A task to be executed by the Scheduler.
Stores timing information and state.
Namespace: fCraftAssembly: fCraft (in fCraft.dll) Version: 0.6.3.2 (0.6.3.2)
Syntax
| C# |
public sealed class SchedulerTask
Members
| All Members | Properties | Methods |
| Member | Description | |
|---|---|---|
| AdjustForExecutionTime | Whether to adjust Interval for execution time (for recurring tasks).
If enabled, the Interval timer is started as soon as execution starts.
Total delay between executions is then equal to Interval.
If disabled, the Interval timer is started only after execution finishes.
Total delay between executions is then (time to execute + Interval). | |
| Callback | Method to call to execute the task. | |
| Delay | Initial execution delay. | |
| Equals(Object) | (Inherited from Object.) | |
| Finalize()()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
| GetHashCode()()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetType()()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
| Interval | Interval between executions (for recurring tasks). | |
| IsBackground | Whether the task should be ran in the background. | |
| IsCritical | Whether this task should be allowed to finish after server shutdown. | |
| IsExecuting | Whether the task is currently being executed. | |
| IsRecurring | Whether the task is one-use or recurring. | |
| IsStopped | Whether the task has stopped.
RunOnce tasks stop after first execution.
RunForever and RunManual tasks only stop manually.
RunRepeating stops after max number of repeats is reached. | |
| MaxRepeats | Maximum number of repeats for RunRepeating tasks.
Set to -1 to run forever. | |
| MemberwiseClone()()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| NextTime | Next scheduled execution time (UTC). | |
| RunForever(TimeSpan) | Runs the task forever at a given interval, until manually stopped. | |
| RunForever(TimeSpan, TimeSpan) | Runs the task forever at a given interval after an initial delay, until manually stopped. | |
| RunForever(Object, TimeSpan, TimeSpan) | Runs the task forever at a given interval after an initial delay, until manually stopped. | |
| RunManual()()()() | Executes the task once immediately, and suspends (but does not stop).
A SchedulerTask object can be reused many times if ran manually. | |
| RunManual(DateTime) | Executes the task once at a given time, and suspends (but does not stop).
A SchedulerTask object can be reused many times if ran manually. | |
| RunManual(TimeSpan) | Executes the task once after a delay, and suspends (but does not stop).
A SchedulerTask object can be reused many times if ran manually. | |
| RunOnce()()()() | Runs the task once, as quickly as possible.
Callback is invoked from the Scheduler thread. | |
| RunOnce(DateTime) | Runs the task once at a given date.
If the given date is in the past, the task is ran immediately. | |
| RunOnce(TimeSpan) | Runs the task once, after a given delay. | |
| RunOnce(Object, DateTime) | Runs the task once at a given date.
If the given date is in the past, the task is ran immediately. | |
| RunOnce(Object, TimeSpan) | Runs the task once, after a given delay. | |
| RunRepeating(TimeSpan, TimeSpan, Int32) | Runs the task a given number of times, at a given interval after an initial delay. | |
| RunRepeating(Object, TimeSpan, TimeSpan, Int32) | Runs the task a given number of times, at a given interval after an initial delay. | |
| Stop()()()() | Stops the task, and removes it from the schedule. | |
| ToString()()()() | (Overrides Object..::..ToString()()()().) | |
| UserState | General-purpose persistent state object,
can be used for anything you want. |