ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Windows Scheduler functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
SchedulerTaskStatus (Function)
In french: PlanificateurEtatTâche
Gets or sets the status of a task created in the Windows scheduler.
Example
// 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:
scheduledTaskCompletedThe last execution of the task was ended by the user.
scheduledTaskDisabledThe task is disabled (it will never be run until it is re-enabled).
scheduledTaskErrorThe specified task does not exist.
scheduledTaskExecutionThe scheduled task is currently run.
scheduledTaskNoMoreExecutedThe task will not be run anymore.
scheduledTaskNotExecutedThe task was not run yet.
scheduledTaskNoTimingThe task does not have any triggers, or all the triggers are invalid/disabled.
scheduledTaskReadyThe task is ready to be run, it is waiting in the scheduler.
scheduledTaskUnscheduledThe 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:
scheduledTaskCompletedThe last execution of the task was ended by the user.
scheduledTaskDisabledThe task is disabled (it will never be run until it is re-enabled).
scheduledTaskErrorThe specified task does not exist.
scheduledTaskExecutionThe scheduled task is currently run.
scheduledTaskNoMoreExecutedThe task will not be run anymore.
scheduledTaskNotExecutedThe task was not run yet.
scheduledTaskNoTimingThe task does not have any triggers, or all the triggers are invalid/disabled.
scheduledTaskReadyThe task is ready to be run, it is waiting in the scheduler.
scheduledTaskUnscheduledThe 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:
scheduledTaskActivateEnables the specified task.
scheduledTaskCompleteEnds 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.
scheduledTaskDisableDisables the specified task.
scheduledTaskExecuteRuns 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
Component: wd290std.dll
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 08/29/2022

Send a report | Local help