ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Windows Scheduler functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
SchedulerTaskStatus (Function)
In french: PlanificateurEtatTâche
Gets or sets the status of a task created in the Windows scheduler.
Example
// L'interrupteur INT_ActiveTâche est coché si la tâche doit être activée
IF INT_ActiveTâche = True THEN
	// Activation de la tâche
	SchedulerTaskStatus("MaTache", scheduledTaskActivate)
ELSE
	// Désactivation de la tâche
	SchedulerTaskStatus("MaTache", 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.
Note: This action is asynchronous: the task will probably not have been completed by the end of the call to the SchedulerTaskStatus.
scheduledTaskDisableDisables the specified task.
scheduledTaskExecuteRuns the task immediately regardless of its schedule.
Note: This action is asynchronous: the task will probably not yet be running at the end of the call to the 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: wd300std.dll
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help