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 (for example, exclude Tuesdays), month (for example, exclude the 1st of every month) or year (for example, 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 Desktop 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 Desktop 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 by way of 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 Days. If it should run once a week on Friday, select Specific days of the week. If it should run twice a month, select Specific days 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 - 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 (for example, exclude Tuesdays), specific days of the month (for example, exclude the 1st of every month), precise date (for example, exclude May 3, 2014), specific holidays (for example, exclude New Year Day) or specific time range (for example, 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 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 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 days 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.
  • 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.
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 trigger is late Options Specifies what Automate Desktop should do when the schedule trigger is late (usually due to the computer being turned off or the Automate Desktop service being stopped). The available options are:
  • Run it immediately - If enabled, the trigger will fire immediately when the system is available
  • Ignore & 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 trigger parameter set below.
  • Disable the trigger - The trigger will disable itself instead of running late and not fire at all.
Reschedule the trigger Options Specifies rescheduling options to select from. The available options are:
  • Relative to original scheduled time - The trigger is rescheduled relative to the original schedule that the it was set to fire. For example, a schedule trigger is set to fire once a day at 11:00 PM. For some reason, the trigger is late and fires at 1:12 AM instead. This option implies that the trigger will reschedule itself at 11:00 PM the following evening.   
  • Relative to the time the trigger was fired- The trigger is rescheduled relative to the time it was fired. For example, a schedule trigger is set to fire once a day at 11:00 PM. For some reason, the trigger is late and fires at 1:12 AM instead. This option implies that the trigger will reschedule itself to fire again at 1: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).

Behavior

Property Type Description
Enable Trigger Yes/No If selected, the trigger will immediately be active upon creation. If disabled, the trigger will stay inactive until it is manually enabled. This parameter is selected by default.

Additional notes

AMTrigger

When this trigger is activated, it automatically passes the AMTrigger object to the task. AMTrigger is a standard Automate Desktop dataset and can be used much like the datasets created by the Database - SQL query activity and Email action. 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 Desktop 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 Desktop 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.