OpenWGA 7.6 - TMLScript reference

WGA » WGA.Jobs
Method :

schedule(jobName, cronSchedule [, startDate, endDate])

On object WGA.Jobs
Usage Adds a schedule to a job

Use this to schedule a job that was added via design configuration in TMLScript, maybe to make the schedule dependent on some setting or condition.

Note that this method should not be used for jobs that are configured via OpenWGA admin client. The schedules of these jobs will be cleared and overwritten with a configuration reload.

Note also that it also is necessary to readd the schedule to a job added via design configuration if the application reconnects. So you should use this method in the connect script of your design to ensure that the schedule is again active after a reconnect.


jobName (String):

Name of the job to add a schedule to

cronSchedule (String):

Schedule string denoting the schedule when this job should run. This string is the same as described for Tab "Job Definitions".

startDate (Date, optional):

An optional start date from which on the schedule shout be active. Specify null to have no start.

endDate (Date, optional)

An optional end date after which the schedule shout be inactive. Specify null to have no end.

Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events