ScheduleTimedTask (open)

Schedule a timed task to run

Syntax

LOADLIB "mod::system/lib/tasks.whlib";

MACRO ScheduleTimedTask(STRING taskname, RECORD options)

Parameters

STRING taskname

module:tag of the task

RECORD options

Options

BOOLEAN allowmissing

Don't fail if the task isn't registered (yet)

DATETIME when

When to run the task (if not set, asap)

Description

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)