ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Windows Scheduler functions
  • Overview
  • Principle
  • Overview
  • Handling a scheduled task
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
Managing the Windows scheduler
Overview
Windows gives you the ability to schedule automatic tasks via the manager of scheduled tasks. A program can be run every Monday at 10:00 AM for example.
WINDEV and WEBDEV allow you to create and configure scheduled tasks from an application via scheduler management functions
Principle

Overview

A scheduled task includes two elements:
  • the task itself: program run, ...
  • the triggers of the task, i.e., the events that will start the task (for example, every Monday at 3:00 PM)
The same task can be associated with several triggers.
To handle these two elements, WINDEV proposes:
When it is created, a scheduled task is run every Monday at 9:00 by default.

Handling a scheduled task

The associated structures enable you to add or modify a scheduled task.
For example, to add a scheduled task, you must:
  1. Define the characteristics of the task with the ScheduledTask structure.
  2. Add the task with SchedulerAddTask.
  3. Define the characteristics of each trigger associated with the task with the TriggerScheduledTask structure.
  4. Add the triggers of the task with SchedulerAddTrigger.
Remarks:
  • To fill the ScheduledTask structure with the characteristics of a scheduled task, use SchedulerTaskProperties.
  • To fill the TriggerScheduledTask structure with the characteristics of a scheduled task, use SchedulerTriggerProperties.
  • To reinitialize one or more structures, use SchedulerReset.
  • To create a scheduled task in Windows Vista (and later), you must have the "Administrator" rights on the computer where the scheduled task will be run.
Related Examples:
The Scheduled Tasks functions Unit examples (WINDEV): The Scheduled Tasks functions
[ + ] Using the SchedulerXXX functions.
You have the ability to see the list of scheduled tasks, to add some, to modify them.
You also have the ability to schedule the times as well as the different parameters of the scheduled task such as the fill options or the options regarding the end of execution for the scheduled task.
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/23/2023

Send a report | Local help