PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Properties specific to the description of appServerScheduledTask variables
  • List of functions that use the appServerScheduledTask type
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
appServerScheduledTask (Type of variable)
In French: serveurAppliTachePlanifiée
The appServerScheduledTask type is used to manage a scheduled task of WEBDEV application server by programming (for a site or a webservice).
Note: See Declaring a variable for more details.
Example
// Programs the task so that it is run every hour
MyScheduledTask is appServerScheduledTask
MyScheduledTask..Name = "MyTask"
MyScheduledTask..Procedure = 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
Remarks

Properties specific to the description of appServerScheduledTask variables

The following properties can be used to handle a scheduled task:
Property nameType usedEffect
EnabledBooleanIndicates whether the task is enabled or not:
  • True if the task scheduling is enabled.
  • False otherwise.
InProgressBooleanIndicates whether the task is currently run:
  • True if the task is currently run.
  • False otherwise.
This property is available in read-only.
This property is updated by AppServerInfoScheduledTask and AppServerListScheduledTask only. The value read reflects the status during the call to these functions (and not the status when reading the property).
HourCharacter stringExecution time of scheduled task. If ..TimeUTC is set to True, this time is in UTC format (universal time).
The possible values are:
  • a digit included between 0 and 23.
  • a list of numbers separated by commas: used to specify several hours.
  • an interval. For example, "9-13".
  • a star ("*") to specify the entire range.
  • an interval with a step, "*/2" for example to perform the task at every even hour.
TimeUTCBoolean
  • True (default value) if the time is expressed in UTC time, which means in universal time (..Hour and ..Minute).
  • False otherwise.
DayOfWeekCharacter stringNumber of the day for which the scheduled task must be run ("2" for example). This number is included between 1 and 7 (1 = Monday, 2 = Tuesday, ...).
This property can also correspond to:
  • a list of numbers separated by commas: used to specify several days.
  • an interval. For example, "1-3" (the task is scheduled for Monday, Tuesday and Wednesday).
  • a star ("*") to specify the entire range.
  • an interval with a step, "*/2" for example to perform the task on every even day of the week.
  • the day of the week in letters ("monday", "tuesday", "wednesday", "thursday", "friday").
DayOfMonthCharacter stringNumber of the day for which the scheduled task must be run ("31" for example). This number is included between 0 and 31.
This property can also correspond to:
  • a list of numbers separated by commas: used to specify several months.
  • an interval. For example, "9-13" (the task is scheduled from the 9th to the 13th of the month).
  • a star ("*") to specify the entire range.
  • an interval with a step, "*/2" for example to perform the task on every odd day of the month.
DayOfMonthOrDayOfWeekBooleanUsed to manage the execution of a scheduled task by specifying the number of the day in the week or the number of the day in the month.
Example: execution every Monday 1st day of month.
This property can correspond to:
  • True to run the scheduled task every Monday AND the first day of the month (cumulated conditions).
  • False to run the task on Monday 1st (exclusive conditions).
MinuteCharacter stringMinutes of the execution time of the scheduled task. If ..TimeUTC is set to True, this time is in UTC format (universal time).
The possible values are:
  • a digit included between 0 and 59.
  • a list of numbers separated by commas: used to specify several minutes.
  • an interval. For example, "9-13".
  • a star ("*") to specify the entire range.
  • an interval with a step, "*/2" for example to perform the task at every even minute.
MonthCharacter stringNumber of the execution month of scheduled task ("11" for example).
The possible values are:
  • a digit included between 1 and 12
  • a list of numbers separated by commas: used to specify several months.
  • an interval. For example, "9-11".
  • a star ("*") to specify the entire range.
  • an interval with a step, "*/2" for example to perform the task on every odd month.
PasswordCharacter stringUser password.
NameCharacter stringTask name.
This name is used to differentiate the tasks associated with the same procedure.
If this property is not filled, the name of the task will correspond to the full name of the procedure (for example: MySet.ProcedureName).
ProcedureNameCharacter stringName of procedure to run.
This property is read-only and it is used to retrieve the name of the procedure associated with the task (to display it in a specific screen for example).
ParameterArrayParameters that will be transmitted to the scheduled task during its execution. Each one of the parameters must be able to be transformed by Serialize (the serialization used is a binary serialization).
ProcedureProcedure nameProcedure that will be run by the scheduled task. This name has the following format:
  • for a procedure found in a set of procedures: <Name of set of procedures>.<Procedure name>.
  • for a procedure found in a component: <Component name>.<Name of set of procedures>.<Procedure name>.
This property does not accept:
  • The local procedures. A local procedure only exists in the context of the call to its parent procedure. This context will not exist anymore during the call to the scheduled task.
  • A Procedure variable (except if this one identifies a procedure belonging to a set of procedures).
UserCharacter stringIndicates the user of the operating system who will run the task. If this value is not filled, the user that will be used is the default user of the application (site or webservice).

Note: These properties can be handled by using one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>

List of functions that use the appServerScheduledTask type

Versions 22 and later
AppServerAddScheduledTask
New in version 22
AppServerAddScheduledTask
AppServerAddScheduledTask
Adds a new scheduled task to the application (site or webservice).
Versions 22 and later
AppServerDeleteScheduledTask
AppServerDeleteScheduledTask
Deletes a scheduled task associated with the application (site or Webservice).
Versions 22 and later
AppServerInfoScheduledTask
AppServerInfoScheduledTask
Reads the description of a scheduled task.
Versions 22 and later
AppServerModifyScheduledTask
AppServerModifyScheduledTask
Modifies an existing scheduled task.
Versions 22 and later
AppServerRunScheduledTask
New in version 22
AppServerRunScheduledTask
AppServerRunScheduledTask
Immediately starts the execution of a scheduled task on a WEBDEV Application Server.
Minimum required version
  • Version 22
Comments
Click [Add] to post a comment