Schedule Trigger

Description

Launches a task at the date, time or interval specified. Can be used for scheduling tasks to run at night or at the end of every work-day, week, month or other time frame. Includes a comprehensive list of pre-defined intervals in which to select from or custom schedules can be created, at which case, a task will run only during the custom dates/times specified.

Exclusions

The Schedule trigger enables selection of specific dates, times or intervals in which to exclude from the current schedule, such as specific days of the week (i.e. exclude Tuesdays), month (i.e. exclude the 1st of every month) or year (i.e. exclude 1st of the year), or specific time ranges.

The Schedule trigger also includes an intuitive rescheduling feature to deal with tasks that failed to launch at their normally scheduled date/time due to a powered down server/workstation or non-responsive AutoMate Task Service, often times attributed to a power outage or system maintenance. In such cases, tasks can be set to run immediately after the AutoMate Task Service is restarted or on the next day relative to the time it was originally scheduled to launch. In addition, this trigger can be used in conjunction with the Holidays feature to enable/disable task execution during the holidays or custom events specified.

Practical Usage

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

Related Topics  

Parameters

General

Property

Type

Description

Interval

Options

The time interval on which the schedule will be based. For example, if the task should run daily, select Day(s). If it should run once a week on Friday, select Specific day(s) of the week. If it should run twice a month, select Specific day(s) of the month. Parameters vary depending on which interval is selected. The available options are:

  • Day(s) (default) - Fires off once every X number of days (except dates/times matching exclusions set in the Exclude properties).

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

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

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

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

  • Specific day(s) of the month - Fires off once every X number of months on the days specified (except dates/times matching exclusions set 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.

  • Holiday(s) - The task will run only on the holidays specified (see Holidays).

Every

Number

The numeric value corresponding to the option selected in the Interval parameter.

Next launch date

Date/Time

The date/time this 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 set).

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

Exclude

Property

Type

Description

Do not trigger task

Options

Enables selection of specific intervals in which to exclude from the current schedule, such as specific days of the week (i.e. exclude Tuesdays), specific days of the month (i.e. exclude the 1st of every month), precise date (i.e. exclude May 3, 2014), specific holidays (i.e. exclude New Year Day) or specific time range (i.e. exclude between 12:00 AM - 06:00 AM).

To set an exclusion, click the Add button and select the type of exclusion under the Do not trigger task parameter. The entries that appear may change depending on which interval is selected. Multiple exclusions are supported. The available options are:

  • On specific days - The task will not run on the days specified. Enable the Expression check box 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 check-box 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 check box 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 check box 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 check box to allow entry of a time expression.

NOTE: When multiple exclusions are specified, an OR condition is applied (as opposed to an AND condition), whereas, the task will not run upon reaching any one of the excluded intervals.

End Date

Property

Type

Description

End Date

Date/Time

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

Rescheduling

Property

Type

Description

When the task is late

Options

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

  • Run immediately (default) - The trigger will fire immediately when the system is available.

  • Reschedule - The trigger will not fire when the system is available and reschedule itself relative to the option selected under the Reschedule the task parameter below.

Reschedule the trigger

Options

Specifies how the trigger should be rescheduled. Valid only if the When the task is late parameter is set to Reschedule. 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).

 

additional notes

AMTrigger

When this trigger is activated, it automatically passes the AMTrigger object to the task. AMTrigger is a standard AutoMate dataset and can be used much like the datasets created by the SQL Query and Email actions. The fields of AMTrigger can be used within a task to determine specific values, such as whether or not the task was started by a trigger, which trigger started the task, when the trigger was activated and other properties. AMTrigger populates a unique set of field–value pairs for each AutoMate trigger. The following table lists the ones specific to this trigger. For more details about a specific AMTrigger field–value pair, click the associated link.

Name

Data Type

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 turned off or the AutoMate Task Service was not running when the task was initially 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.