title | description | ms.author | ms.date | ms.topic | author | ms.reviewer |
---|---|---|---|---|---|---|
TaskScheduler.CanCreateTask() Method |
Checks whether it is possible to schedule tasks in this session (depends on the user/app entitlements). |
solsen |
05/14/2024 |
reference |
SusanneWindfeldPedersen |
solsen |
Version: Available or changed with runtime version 1.0.
Checks whether it is possible to schedule tasks in this session (depends on the user/app entitlements).
Ok := TaskScheduler.CanCreateTask()
Ok
Type: Boolean
The TaskScheduler.CanCreateTask
checks if tasks are allowed to be created by the user/app of the current session.
For more information about the task scheduler, see Using the Task Scheduler.
This example shows how to use TaskScheduler.CanCreateTask
to safely run code that creates tasks.
procedure CreateTask()
begin
if not CanCreateTask() then
begin
// handle the error
end;
// code can now assume that tasks can be created
...
end;
TaskScheduler Data Type
Using the Task Scheduler
Get Started with AL
Developing Extensions