AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones específicas de la Web / Funciones de tareas programadas de WEBDEV
  • Properties specific to appServerScheduledTask variables
  • List of functions that use the appServerScheduledTask type
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
The appServerScheduledTask type is used to manage a scheduled task of WEBDEV Application Server through programming (for a site or a web service).
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Ejemplo
// 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
Propiedades

Properties specific to appServerScheduledTask variables

The following properties can be used to handle a scheduled task:
Property nameType usedEffect
DayOfMonthCharacter stringNumber of the day for which the scheduled task must be run ("31" for example). This number is between 0 and 31.
This property can also correspond to:
  • a comma-separated list of numbers: 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.
DayOfMonthOrDayOfWeekBooleanManaged 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 the month.
This property can correspond to:
  • True to run the scheduled task every Monday AND on the first day of the month (cumulative conditions).
  • False to perform the task only on Monday 1st (exclusive conditions).
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 comma-separated list of numbers: 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").
EnabledBooleanIndicates whether the task is enabled or not:
  • True if the task scheduling is enabled.
  • False otherwise.
HourCharacter stringExecution 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 comma-separated list of numbers: 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.
InProgressBooleanIndicates whether the task is currently run:
  • True if the task is currently run.
  • False otherwise.
This property is 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).
MinuteCharacter stringMinutes 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 comma-separated list of numbers: 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 between 1 and 12
  • a comma-separated list of numbers: 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.
NameCharacter stringTask name.
This name is used to differentiate the tasks associated with the same procedure.
If this property is not set, the task name will correspond to the full name of the Procedure (for example: MyColletion.ProcedureName).
ParameterArrayParameters 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.
Note: When the scheduled task is executed, WEBDEV Application Server will automatically transfer the parameters to the Procedure. The same procedure can therefore be associated with multiple scheduled tasks that will pass different parameters.
PasswordCharacter string or Secret stringUser password.
Novedad versión 2025
Cadenas secretas: Si utiliza el almacén de cadenas secretas, el tipo de cadena secreta utilizado para este parámetro debe ser "ANSI o Unicode string".
Para obtener más información sobre las cadenas secretas y el almacén, consulte Almacén de cadenas secretas.
ProcedureProcedure nameProcedure that will be run by the scheduled task. This name has the following format:
  • for a procedure in a collection of procedures: <Nom de la collection de procédures>.<Nom de la procédure>.
  • for a Procedure present in a component: <Nom du composant>.<Nom de la collection de procédures>.<Nom de la procédure>.
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).
ProcedureNameCharacter stringName of the procedure to be executed.
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).
TimeUTCBoolean
  • True (default value) if the time is in UTC (Hour and Minute properties).
  • False otherwise.
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 web service).
Observaciones

List of functions that use the appServerScheduledTask type

AppServerAddScheduledTaskAñade una nueva tarea programada a la aplicación (sitio o servicio web).
AppServerDeleteScheduledTaskElimina una tarea programada associated con la aplicación (sitio o Webservice).
AppServerInfoScheduledTaskLee la description de una tarea programada.
AppServerModifyScheduledTaskModifica una tarea programada existente.
AppServerRunScheduledTaskInicia inmediatamente la ejecución de una tarea programada en un servidor de aplicaciones WEBDEV.
Versión mínima requerida
  • Versión 22
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 16/05/2025

Señalar un error o enviar una sugerencia | Ayuda local