Function scheduleTask
- scheduleTask(
tasktype: string,
taskdata?: IPCMarshallableData,
options?: ScheduleTaskOptions,
): Promise<number>Parameters
- tasktype: string
Type of the task to schedule (eq: wrd:deleteschemas) - refers to to the servicemanager:managedtask in the moduledefinition
Optional
taskdata: IPCMarshallableDataTask data, as specified by the task. The data must fit in 4K of HSON data
Optional
options: ScheduleTaskOptions
Returns Promise<number>
id of this task. This id is a database id and can be used by later scripts
- tasktype: string
Schedule a managed task if this transaction commits
A managed task, once scheduled, will always attempt to complete, and is restarted when it or the task manager fails. Managed tasks are often used for 'after effects' which can take a lot of time, eg the actual deletion of a WRD schema. A managed task will be attempted even if the script that queued it exits before the task starts. If work is open, the task will be queued as soon as the current work is committed, and will not be queued if the work is rolled back.