|
|
|
|
- Properties specific to appServerScheduledTask variables
- List of functions that use the appServerScheduledTask type
appServerScheduledTask (Type of variable) In french: serveurAppliTachePlanifiée
The appServerScheduledTask type is used to manage a scheduled task of WEBDEV Application Server through programming (for a site or a webservice). Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
// 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
Remarks Properties specific to appServerScheduledTask variables The following properties can be used to handle a scheduled task: | | | Property name | Type used | Effect |
---|
DayOfMonth | Character string | Number 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.
| DayOfMonthOrDayOfWeek | Boolean | Managed the execution of a scheduled task by specifying the day number of the week or day number of 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).
| DayOfWeek | Character string | Number 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").
| Enabled | Boolean | Indicates whether the task is enabled or not: - True if the task scheduling is enabled.
- False otherwise.
| Hour | Character string | Execution time of scheduled task. If TimeUTC is set to True, this time will be in UTC. 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.
| InProgress | Boolean | Indicates whether the task is currently run: - True if the task is currently run.
- False otherwise.
This property is read-only. | Minute | Character string | Minutes of the execution time of the scheduled task. If TimeUTC is set to True, this time will be in UTC. 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.
| Month | Character string | Number 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.
| Name | Character string | Task 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). | Parameter | Array | Parameters that will be transmitted to the scheduled task during its execution. Each one of the parameters should be transformed by Serialize (binary serialization is used). The WEBDEV Application Server needs to keep the parameters to pass them at each call. To do so, the value of each parameter will be serialized. Remark: When the scheduled task is run, the WEBDEV Application Server will automatically pass the parameters to the procedure. The same procedure can therefore be associated with multiple scheduled tasks that will pass different parameters. | Password | Character string | User password. | Procedure | Procedure name | Procedure 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).
| ProcedureName | Character string | Name of procedure to execute. 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). | TimeUTC | Boolean | - True (default value) if the time is in UTC (Hour and Minute properties).
- False otherwise.
| User | Character string | Indicates 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). |
List of functions that use the appServerScheduledTask type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|