Sets a task that runs a codeunit to the ready state. The task will not run unless it is in the ready state.
[OK =: ]SETTASKREADY(Task[,NotBefore])
Specifies the unique identifier of the task. The unique identifier is returned by the CREATETASK function.
Specifies the date and time that you want to make the task ready.
Specifies the recordID of the record that you want to run the task on.
Property Value/Return Value
true if a task has been set to ready; otherwise, false.
For more information about tasks and TASKSCEDULER data type functions, see managing tasks Task Scheduler.
The following example creates a task, and then uses the SETTASKREADY function to set the task to ready.
The code requires that you create the following C/AL variable.
TaskID := TASKSCHEDULER.CREATETASK(CODEUNIT::"Job Queue Dispatcher", CODEUNIT::"Job Queue Error Handler"); TASKSCHEDULER.SETTASKREADY(taskID);