ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Web-specific functions / WEBDEV scheduled task 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
Adds a new scheduled task to the application (site or Webservice).
Caution: The new scheduled task is not persistent. It will be deleted when restarting the WEBDEV Application Server or when deploying the site.
It is recommended to use the "Site configuration": Start Application Server" event to use AppServerAddScheduledTask. The scheduled task will be automatically recreated.
Example
// Programs the task so that it is run every hour
MyScheduledTask is appServerScheduledTask
MyScheduledTask.Name = "MyTask"
MyScheduledTask.Procédure = MyProc
MyScheduledTask.Month = "*"
MyScheduledTask.DayOfMonth = "*"
MyScheduledTask.DayOfWeek = "*"
MyScheduledTask.Hour = "*"
MyScheduledTask.Minute = "0"
 
IF NOT AppServerAddScheduledTask(MyScheduledTask) THEN
// Error case (if a task with the same name already exists for example)
END
Syntax
<Result> = AppServerAddScheduledTask(<Scheduled task>)
<Result>: Boolean
  • True if the scheduled task was added.
  • False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Scheduled task>: appServerScheduledTask variable
Name of appServerScheduledTask variable corresponding to the description of the scheduled task to add.
Component: wd290page.dll
Minimum version required
  • Version 22
Comments
Click [Add] to post a comment

Last update: 06/28/2022

Send a report | Local help