|
|
|
|
SchedulerTaskStatus (Function) In french: PlanificateurEtatTâche Gets or sets the status of a task created in the Windows scheduler.
// The CBOX_TaskEnabled check box is checked if the task must be enabled IF CBOX_TaskEnabled = True THEN // Enable task SchedulerTaskStatus("MyTask", scheduledTaskActivate) ELSE // Disable the task SchedulerTaskStatus("MyTask", scheduledTaskDisable) END
Syntax
Getting the status of a task Hide the details
<Result> = SchedulerTaskStatus(<Task name>)
<Result>: Integer constant Status of the specified task: | | scheduledTaskCompleted | The last execution of the task was ended by the user. | scheduledTaskDisabled | The task is disabled (it will never be run until it is re-enabled). | scheduledTaskError | The specified task does not exist. | scheduledTaskExecution | The scheduled task is currently run. | scheduledTaskNoMoreExecuted | The task will not be run anymore. | scheduledTaskNotExecuted | The task was not run yet. | scheduledTaskNoTiming | The task does not have any triggers, or all the triggers are invalid/disabled. | scheduledTaskReady | The task is ready to be run, it is waiting in the scheduler. | scheduledTaskUnscheduled | The task properties do not allow the task to be run. |
Before the first execution of the task, <Result> is set to scheduledTaskNotExecuted. During the execution of the task, <Result> is set to scheduledTaskExecution. After the execution of the task, <Result> is set to scheduledTaskReady. <Task name>: Character string Name of the task to use. This task was created with SchedulerAddTask.
Changing the status of a task Hide the details
<Result> = SchedulerTaskStatus(<Task name> , <Action>)
<Result>: Integer constant New status of the specified task: | | scheduledTaskCompleted | The last execution of the task was ended by the user. | scheduledTaskDisabled | The task is disabled (it will never be run until it is re-enabled). | scheduledTaskError | The specified task does not exist. | scheduledTaskExecution | The scheduled task is currently run. | scheduledTaskNoMoreExecuted | The task will not be run anymore. | scheduledTaskNotExecuted | The task was not run yet. | scheduledTaskNoTiming | The task does not have any triggers, or all the triggers are invalid/disabled. | scheduledTaskReady | The task is ready to be run, it is waiting in the scheduler. | scheduledTaskUnscheduled | The task properties do not allow the task to be run. |
<Task name>: Character string Name of the task to use. This task was created with SchedulerAddTask. <Action>: Integer constant Action that must be performed on the specified task: | | scheduledTaskActivate | Enables the specified task. | scheduledTaskComplete | Ends the execution of the task if the status of the task is set to scheduledTaskExecution. Remark: This action is asynchronous: the task may not be completed yet at the end of the call to SchedulerTaskStatus. | scheduledTaskDisable | Disables the specified task. | scheduledTaskExecute | Runs the task immediately regardless of its schedule. Remark: This action is asynchronous: the task may not yet be running at the end of the call to SchedulerTaskStatus. |
Before the first execution of the task, <Result> is set to scheduledTaskNotExecuted. During the execution of the task, <Result> is set to scheduledTaskExecution. After the execution of the task, <Result> is set to scheduledTaskReady. Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|