Schedule Trigger

Description

Launches a task at the date, time or interval specified. This trigger can be used for scheduling tasks to run at night or at the end of every work-day, week, month or other time frame.  A custom schedule can be created where a task will run only on the custom dates and times specified. In addition, the "Exclude" option can be used to exclude task execution on certain days of the week, month or year. Additionally, this trigger includes an intuitive rescheduling feature to determine how the task should reschedule itself in case it is late. This can occur if the computer was turned off or the AutoMate Task Service was not running or was disabled when the task was scheduled to run.

Practical Usage

The Schedule trigger is the most commonly used trigger. It is ideal for scheduling routine tasks to run hourly, daily, weekly, monthly, at night or during off peak hours, or via a custom schedule.

Parameters

General Properties

Property

Description

Interval

The time interval on which the schedule will be based. For example, if the workflow should run every day, select daily. If the workflow should run every month, select specific days of the month. The entries that appear depend on which interval is selected. The available options are:

  • daily - Fires off once every X number of days (except dates/times matching exclusions entered in the Exclude properties).

  • hours - Fires off once every X number of hours (except dates/times matching exclusions entered in the Exclude properties).

  • minutes - Fires off once every X number of minutes (except dates/times matching exclusions entered in the Exclude properties).

  • seconds - Fires off once every X number of seconds (except dates/times matching exclusions entered in the Exclude properties).

  • specific days of the week - Fires off once every X number of weeks on the days specified (except dates/times matching exclusions entered in the Exclude properties).

  • specific days of the month - Fires off once every X number of months on the days specified (except dates/times matching exclusions entered in the Exclude properties).

  • custom schedule - The task will run only on the custom dates and times specified. Use this option if there is no regular interval for the task to automatically reschedule on.

  • Holidays - The task will run only on the holidays specified.

NOTE: Holidays can be customized by navigating to System -> Options -> Holidays tab.

Next Launch Date/Time

Specifies the date/time the trigger will initially launch. It also determines the relative launch date/time of tasks that are set to run upon a specific interval. To use the current date and time, press Now. This will cause the task to trigger as soon as it is saved (whether or not Exclusions are entered).

NOTE: This parameter is not present if Custom Date is selected as the interval.

Exclude Properties

The Exclude tab provides an option to select specific days, certain days of the week or month or specific time intervals in which to exclude from the current schedule. To set an exclusion, click the Add button and select the type of exclusion under the Do not trigger task parameter.

Property

Description

Do not trigger task

Specifies the time interval to exclude. The entries that appear below the Do not trigger task option changes depending on which interval is selected. The available options are:

  • On specific days - The task will not run on the days specified. Enable the Expression checkbox to allow entry of a date expression. Press the Today button to exclude the present day. Enter the desired time range in the From and To parameters.

  • On specific time range - The task will not run during the time ranges specified. Enter the desired time range you wish to omit in the From and To parameters. Enable the Expression checkbox to allow entry of a time expression.

  • On specific days of the week - The task will not run on the days of the week specified. Add a check to the day(s) of the week you wish to omit. Enter the desired time range you wish to omit in the From and To parameters. Enable the Expression checkbox to allow entry of a time expression.

  • On specific days of the month - The task will not run on the days of the month specified. Selecting this option allows more specific options to be selected. Enter the desired time range you wish to omit in the From and To parameters. Enable the Expression checkbox to allow entry of a time expression.

  • On holidays - The task will not run on the specific holiday selected. Holidays can be customized by navigating to System -> Options -> Holidays tab. Enter the desired time range you wish to omit in the From and To parameters. Enable the Expression checkbox to allow entry of a time expression.

End Date Properties

Property

Description

End Date

If enabled, causes the trigger to disable itself once the selected date and time occurs (disabled by default). To immediately end trigger activity, click Now.

Rescheduling Properties

Property

Description

When the task is late

Specifies what AutoMate should do when a task is late (usually due to the machine being turned off or the AutoMate service being stopped). The available options are:

  • Immediately run the task - If enabled, the trigger will fire immediately when the system is available (enabled by default).

  • Ignore and Reschedule - If enabled, the trigger will not fire when the system is available and reschedule itself relative to the option selected under the Reschedule the task parameter set below (disabled by default).

  • Disable the trigger - If enabled, the trigger will disable itself instead of running late and not fire at all (disabled by default).

Reschedule the task

Specifies rescheduling options to select from. The available options are:

 

  • Relative to originally set time - Relative to the original schedule that the trigger was set to fire (enabled by default). For example, a task is scheduled to execute once a day at 11:00 PM. For some reason, the task is late and executes at 1:12 AM instead. This option implies that the task will reschedule itself to run at 11:00 PM the following evening (disabled by default).   

  • Relative to the time the task was launched - Relative to the time the trigger was fired. Using the example above, this option specifies that the task will reschedule itself to execute again at 2:12 AM the following evening.  

  • Disable the trigger - The trigger will disable itself and not fire at all. It must be re-enabled by the user to run as normally scheduled (disabled by default).

AMTrigger

When this trigger is activated, it automatically passes the "AMTrigger" object to the task. AMTrigger can be used within a task to determine whether or not the task was started by a trigger, which trigger started the task, when the trigger was activated and other trigger related properties. For more details, see Using AMTrigger. The AMTrigger fields listed in the table below are specific only to the Schedule trigger.

Name

Type

Return Value

AMTrigger.TaskLate

Boolean

Indicates to the task whether the schedule trigger launched past it's next launch date time. This can occur if the computer was off or the AutoMate Task Service was not running or was disabled when the task was scheduled to run. If the task was late, the value returned is 1. Otherwise, it will be 0.

 

NOTE: A full list of AMTrigger objects exclusive to each trigger can be viewed from the Expression Builder by expanding Objects -> Triggers and selecting the desired trigger.

See Also

↑ Top of Page