![]() |
fCraft
0.636
Custom Minecraft Server
|
A task to be executed by the Scheduler. Stores timing information and state. More...
Public Member Functions | |
| SchedulerTask | RunOnce () |
| Runs the task once, as quickly as possible. Callback is invoked from the Scheduler thread. | |
| SchedulerTask | RunOnce (TimeSpan delay) |
| Runs the task once, after a given delay. | |
| SchedulerTask | RunOnce (DateTime time) |
| Runs the task once at a given date. If the given date is in the past, the task is ran immediately. | |
| SchedulerTask | RunOnce (object userState, TimeSpan delay) |
| Runs the task once, after a given delay. | |
| SchedulerTask | RunOnce (object userState, DateTime time) |
| Runs the task once at a given date. If the given date is in the past, the task is ran immediately. | |
| SchedulerTask | RunForever (TimeSpan interval) |
| Runs the task forever at a given interval, until manually stopped. | |
| SchedulerTask | RunForever (TimeSpan interval, TimeSpan delay) |
| Runs the task forever at a given interval after an initial delay, until manually stopped. | |
| SchedulerTask | RunForever (object userState, TimeSpan interval, TimeSpan delay) |
| Runs the task forever at a given interval after an initial delay, until manually stopped. | |
| SchedulerTask | RunRepeating (TimeSpan delay, TimeSpan interval, int times) |
| Runs the task a given number of times, at a given interval after an initial delay. | |
| SchedulerTask | RunRepeating ([CanBeNull] object userState, TimeSpan delay, TimeSpan interval, int times) |
| Runs the task a given number of times, at a given interval after an initial delay. | |
| SchedulerTask | RunManual () |
| Executes the task once immediately, and suspends (but does not stop). A SchedulerTask object can be reused many times if ran manually. | |
| SchedulerTask | RunManual (TimeSpan delay) |
| Executes the task once after a delay, and suspends (but does not stop). A SchedulerTask object can be reused many times if ran manually. | |
| SchedulerTask | RunManual (DateTime time) |
| 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. | |
| SchedulerTask | Stop () |
| Stops the task, and removes it from the schedule. | |
| override string | ToString () |
Properties | |
| DateTime | NextTime [get, set] |
| Next scheduled execution time (UTC). | |
| TimeSpan | Delay [get, set] |
| Initial execution delay. | |
| bool | IsRecurring [get, set] |
| Whether the task is one-use or recurring. | |
| bool | IsBackground [get, set] |
| Whether the task should be ran in the background. | |
| bool | IsStopped [get, set] |
| 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. | |
| bool | IsExecuting [get, set] |
| Whether the task is currently being executed. | |
| bool | AdjustForExecutionTime [get, set] |
| 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). | |
| TimeSpan | Interval [get, set] |
| Interval between executions (for recurring tasks). | |
| int | MaxRepeats [get, set] |
| Maximum number of repeats for RunRepeating tasks. Set to -1 to run forever. | |
| bool | IsCritical [get, set] |
| Whether this task should be allowed to finish after server shutdown. | |
| SchedulerCallback | Callback [get, set] |
| Method to call to execute the task. | |
| object | UserState [get, set] |
| General-purpose persistent state object, can be used for anything you want. | |
A task to be executed by the Scheduler. Stores timing information and state.
| SchedulerTask fCraft.SchedulerTask.RunForever | ( | TimeSpan | interval | ) |
Runs the task forever at a given interval, until manually stopped.
| SchedulerTask fCraft.SchedulerTask.RunForever | ( | TimeSpan | interval, |
| TimeSpan | delay | ||
| ) |
Runs the task forever at a given interval after an initial delay, until manually stopped.
| SchedulerTask fCraft.SchedulerTask.RunForever | ( | object | userState, |
| TimeSpan | interval, | ||
| TimeSpan | delay | ||
| ) |
Runs the task forever at a given interval after an initial delay, until manually stopped.
| SchedulerTask fCraft.SchedulerTask.RunManual | ( | ) |
Executes the task once immediately, and suspends (but does not stop). A SchedulerTask object can be reused many times if ran manually.
| SchedulerTask fCraft.SchedulerTask.RunManual | ( | TimeSpan | delay | ) |
Executes the task once after a delay, and suspends (but does not stop). A SchedulerTask object can be reused many times if ran manually.
| SchedulerTask fCraft.SchedulerTask.RunManual | ( | DateTime | time | ) |
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.
| SchedulerTask fCraft.SchedulerTask.RunOnce | ( | ) |
Runs the task once, as quickly as possible. Callback is invoked from the Scheduler thread.
| SchedulerTask fCraft.SchedulerTask.RunOnce | ( | TimeSpan | delay | ) |
Runs the task once, after a given delay.
| SchedulerTask fCraft.SchedulerTask.RunOnce | ( | DateTime | time | ) |
Runs the task once at a given date. If the given date is in the past, the task is ran immediately.
| SchedulerTask fCraft.SchedulerTask.RunOnce | ( | object | userState, |
| TimeSpan | delay | ||
| ) |
Runs the task once, after a given delay.
| SchedulerTask fCraft.SchedulerTask.RunOnce | ( | object | userState, |
| DateTime | time | ||
| ) |
Runs the task once at a given date. If the given date is in the past, the task is ran immediately.
| SchedulerTask fCraft.SchedulerTask.RunRepeating | ( | TimeSpan | delay, |
| TimeSpan | interval, | ||
| int | times | ||
| ) |
Runs the task a given number of times, at a given interval after an initial delay.
| SchedulerTask fCraft.SchedulerTask.RunRepeating | ( | [CanBeNull] object | userState, |
| TimeSpan | delay, | ||
| TimeSpan | interval, | ||
| int | times | ||
| ) |
Runs the task a given number of times, at a given interval after an initial delay.
| SchedulerTask fCraft.SchedulerTask.Stop | ( | ) |
Stops the task, and removes it from the schedule.
| override string fCraft.SchedulerTask.ToString | ( | ) |
|
getset |
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).
|
getset |
Method to call to execute the task.
|
getset |
Initial execution delay.
|
getset |
Interval between executions (for recurring tasks).
|
getset |
Whether the task should be ran in the background.
|
getset |
Whether this task should be allowed to finish after server shutdown.
|
getset |
Whether the task is currently being executed.
|
getset |
Whether the task is one-use or recurring.
|
getset |
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.
|
getset |
Maximum number of repeats for RunRepeating tasks. Set to -1 to run forever.
|
getset |
Next scheduled execution time (UTC).
|
getset |
General-purpose persistent state object, can be used for anything you want.
1.8.2