Function scheduleTimedTask
- scheduleTimedTask(
taskname: string,
options?: { when?: FlexibleInstant },
): Promise<{ get taskDone(): Promise<void> }>Parameters
- taskname: string
module:tag of the task
Optional
options: { when?: FlexibleInstant }when: When to run the task (if not set, asap)
Returns Promise<{ get taskDone(): Promise<void> }>
An object with taskDone(), which returns a promise that resolves when the task is completed
- taskname: string
Schedule a timed task to run.
The task will be run at the specified time, or if not set, as soon as possible. If another request is made to run the task even earlier, or if the tasks 'runat' causes it to run, this request will be ignored (ie you cannot request multiple runs of a task by repeatedly calling this function)