PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Retrieves or modifies 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 the task
SchedulerTaskStatus("MyTask", scheduledTaskActivate)
ELSE
// Disable the task
SchedulerTaskStatus("MyTask", scheduledTaskDisable)
END
Syntax

Finding out the status of a task Hide the details

<Result> = SchedulerTaskStatus(<Task Name>)
<Result>: Integer constant
Status of the specified task:
scheduledTaskNoTimingNo schedule was defined for the task or all the task schedules are invalid or disabled.
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.
scheduledTaskUnscheduledThe task properties do not allow the task to be run.
scheduledTaskNotExecutedThe task was not run yet.
scheduledTaskNoMoreExecutedThe task will not be run anymore.
scheduledTaskReadyThe task is ready to be run, it is waiting in the scheduler.
scheduledTaskCompletedThe last execution of the task was ended by the user.

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 (with quotes)
Name of the task to use. This task was created by SchedulerAddTask.

Modifying the status of a task Hide the details

<Result> = SchedulerTaskStatus(<Task Name> , <Action>)
<Result>: Integer constant
New status of the specified task:
scheduledTaskNoTimingNo schedule was defined for the task or all the task schedules are invalid or disabled.
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.
scheduledTaskUnscheduledThe task properties do not allow the task to be run.
scheduledTaskNotExecutedThe task was not run yet.
scheduledTaskNoMoreExecutedThe task will not be run anymore.
scheduledTaskReadyThe task is ready to be run, it is waiting in the scheduler.
scheduledTaskCompletedThe last execution of the task was ended by the user.
<Task Name>: Character string (with quotes)
Name of the task to use. This task was created by SchedulerAddTask.
<Action>: Integer constant
Action that must be performed on the specified task:
scheduledTaskActivateEnables the specified task.
scheduledTaskDisableDisables the specified task.
scheduledTaskExecuteRuns the task immediately regardless of its schedule.
Note: This action is asynchronous: the task may still not be run at the end of the call to SchedulerTaskStatus.
scheduledTaskCompleteEnds the execution of the task if the status of the task is set to scheduledTaskExecution.
Note: This action is asynchronous: the task may still not be completed 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.
Remarks
The SchedulerXXX functions are not available in Windows NT if a version earlier than Internet Explorer 5.0 is installed.
Components
WINDEVReports and Queries wd230std.dll
Minimum required version
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment