Triggers

Triggers are used to define schedules and submit Jobs based on changes or events in the JAMS environment. After a Trigger is added, JAMS will continuously watch for the specified Trigger condition and then submit the Job. After the Job has completed, the Trigger is reset and JAMS watches for the next occurrence. The Job will not be submitted until the Trigger condition has been met. You can add Triggers, other than Interval or Recurrence Triggers, to a Job or Folder. Any Triggers set on a Folder will be inherited by that Folder's child Jobs.

You can add multiple Trigger conditions to a Job by specifying the same name in the And Group property that is described below. JAMS will look for all the specified Triggers in the same And Group to be met before the Job is scheduled.

NOTE: If you leave the And Group empty, it creates a group with a blank name. All Triggers that have an empty And Group are put into this group and the Job will not run until all Triggers in this group are satisfied.

Triggers are used to automatically schedule Jobs. They can be automatically scheduled to run at specific dates and times, at regular intervals, or in response to dynamic events such as a file arriving on a file system or email arriving in a mailbox. The following types of triggers are available:

  • Schedule Trigger
  • Job Completion Trigger
  • Interval Trigger
  • File Trigger
  • Variable Trigger
  • Email Trigger
  • Recurrence (Same Monitor Entry)
  • Recurrence (New Monitor Entry)
NOTE: Triggers will continue to be active until you disable them from their properties on the Schedule tab. See the tables below for the Enabled option. Cancelling a Watch Job in the Monitor view does not disable a Trigger.

Running a Job on a Schedule

You can add a Schedule Trigger to a Job or a Folder to set it to automatically run at a set date and time. If you set the Trigger on a Folder, all Jobs in the Folder will inherit the Trigger.

  1. Click Definitions from the Shortcuts menu.
  2. Right-click a Job or Folder and select Properties.
  3. Click the Schedule tab.
  4. Click +.
  5. Select Run this job | on a schedule.
  6. In the Scheduled Date field, enter a date or expression when the Job should run.
  7. In the Schedule Time field, enter a time when the Job should run.
  8. In the Time Zone field, select the appropriate time zone.
  9. Set any additional Exceptions or Override properties to control the Job as needed. See the table below.
  10. Click Finish. The Trigger is listed under the Run this job section on the Schedule tab.
  11. Click Save and Close.

Schedule Trigger Properties

Status Description
Enabled Select or clear the checkbox to enable or disable the Trigger. When this option is disabled, this Trigger will not cause the Job to run.
Schedule Description
Scheduled Date This property is a natural language date specification for selecting the date the Job should run. You can select a value from the drop-down menu or enter values such as 1st Friday of Month. A comma separated list may be used. For more information, see Specifying Dates Using Natural Language .
Scheduled Time This property is the time of day when the Job should start.
Time Zone This property is the time zone used for this item.
Exceptions Description
Except For Date This property lists the dates or date specifications when this Job will not run.
Start Date If this option is defined, the Job will not be scheduled to run until this date.
End Date If this option is defined, the Job will not be scheduled to run after this date.
Non Workday Scheduling

This property determines if this Job should be scheduled on non-workdays. The following options are available:

  • Schedule – Schedule the Job even though it is a non-workday.
  • Ignore – Ignore the Job and do not schedule it.
  • Defer – Defer the Job until the next specified workday.
Override Description
Calendar This property specifies the Calendar to use for scheduling. When a Calendar is listed, the Job will have access to the Date Types, such as holidays, in the Calendar.
Execute As This property specifies the set of Credentials the Job will execute as when submitted by this Trigger.
Agent This property specifies the Agent where the Job will execute when the Job is submitted by this Trigger.
Batch Queue This property specifies the Batch Queue that will be used when this Job is scheduled by this Trigger.
Submit On Hold Select or clear this checkbox to submit the Job on Hold when it is scheduled by this Trigger. The Job will require manual intervention before it is allowed to run.
Comment This property specifies a comment that will be added to the entry when it is submitted by this Trigger.

Running a Job after Another Job

You can add a Job Completion Trigger to a Job or a Folder to set it to automatically run if the monitored Job completes or fails. If you set the Trigger on a Folder, all Jobs in the Folder will inherit the Trigger.

  1. Click Definitions from the Shortcuts menu.
  2. Right-click a Job or Folder and select Properties.
  3. Click the Schedule tab.
  4. Click +.
  5. Select Run this job | after another Job.
  6. In the Schedule For Date field, enter a date when the Job should run.
  7. In the Scheduled Time field, enter a time when the Job should run.
  8. In the Trigger Job field, click … to browse to the Job that will act as the Trigger.
  9. In the Success or Failure field, select Success, Failure, or Any to set the status for the Job that acts as the Trigger.
  10. Set any additional Override properties to control the Job as needed. See the table below.
  11. Click Finish. The Trigger is listed under the Run this job section on the Schedule tab.
  12. Click Save and Close.

Job Completion Trigger Properties

Status Description
Enabled Select or clear this checkbox to enable or disable a Trigger. When this option is disabled, this Trigger will not cause the Job to run.
Schedule Description
Schedule For Date

This property specifies the date the Job is scheduled to run. If you do not specify a date, the Job will run today at the time specified in the Scheduled Time property.

NOTE: If neither property is set, the Job will run immediately if not set in either place.
Scheduled Time

This property specifies the time of day when the Job is scheduled to run. If you do not specify a time, the Job will run at the current time and on the day specified in the Schedule For Date property.

NOTE: If neither property is set, the Job will run immediately if not set in either place.
Trigger Description
Trigger Job This property specifies the Job which the trigger should watch for.
Success or Failure This property specifies if the Trigger will watch for a successful or failed completion of the Trigger Job. If Success and Failure conditions have not been set on the Trigger Job, Success will be satisfied by Informational or better completion status, and Failure will be satisfied by Warning or worse completion status. You can also select Any to have JAMS trigger the Job regardless of the final status.
And Group

All the Triggers in the same "And Group" must fire before the Job is triggered.

If you leave the And Group empty, it creates a group with a blank name. All Triggers that have an empty And Group are put into this group and the Job will not run until all Triggers in this group are satisfied.

Override Description
Execute As This property specifies the set of credentials the Job will execute as when submitted by this Trigger.
Agent This property specifies the Agent where the Job will execute when the Job is submitted by this Trigger.
Batch Queue This property specifies the Batch Queue that will be used when this Job is scheduled by this Trigger.
Submit On Hold Select or clear this checkbox to submits the Job on Hold when it is scheduled by this Trigger. The Job will require manual intervention before it is allowed to run.
Comment This property specifies a comment that will be added to the entry when it is submitted by this Trigger.

Running a Job on an Interval

You can add an Interval Trigger to a Job to set it to automatically run on a set period of time, such as every 15 minutes. Interval Triggers should only be used for Jobs that will run all day, every day. If you need more control on the times that the Job will run, it is recommended to use a recurrence.

NOTE: This option cannot be set at the Folder-level.
  1. Click Definitions from the Shortcuts menu.
  2. Right-click a Job and select Properties.
  3. Click the Schedule tab.
  4. Click +.
  5. Select Run this job | on an interval.
  6. In the Schedule Interval field, enter the time between each run of the Job.
  7. In the Next Scheduled Time UTC, enter the date and time the Job should run again.
  8. In the Always Resubmit field, select to create a new entry in the Monitor view for each run of the Job. It is recommended that this option is used by default.
  9. In the Base Time field, select EndTime, ScheduledTime, or StartTime to set what time should be used to calculate the next repetition when the Job resubmits.
  10. Set any additional Override properties to control the Job as needed. See the table below.
  11. Click Finish. The Trigger is listed under the Run this job section on the Schedule tab.
  12. Click Save and Close.

Interval Trigger Properties

Status Description
Enabled Select or clear this checkbox to enable or disable a Trigger. When this option is disabled, this Trigger will not cause the Job to run.
Interval Description
Schedule interval This property specifies when the Job will be scheduled on this interval.
Next Scheduled Time UTC This property specifies the date and time when this Job is next scheduled to run using UTC. This property is updated after one Job submission if the Always Resubmit option is selected.
Always Resubmit? Select or clear the checkbox to create a new entry for each Job. When this option is selected, a new entry is submitted for each interval. When this option is cleared, the existing entry is repeated if the interval is shorter than the retain time.
Base Time

This property specifies what time should be used to calculate the next repetition when the Job resubmits. Options include:

  • EndTime – The completion time of the entry in the Monitor.
  • ScheduledTime – The time the Job is scheduled to run.
  • StartTime - The actual start time of the Job.
Override Description
Execute As This property specifies the set of credentials the Job will execute as when submitted by this Trigger.
Agent This property specifies the Agent where the Job will execute when the Job is submitted by this Trigger.
Batch Queue This property specifies the Batch Queue that will be used when this Job is scheduled by this Trigger.
Submit On Hold Select or clear this checkbox to submits the Job on Hold when it is scheduled by this Trigger. The Job will require manual intervention before it is allowed to run.
Comment This property specifies a comment that will be added to the entry when it is submitted by this Trigger.

 

Running a Job based on a File

You can add a File Trigger to a Job or a Folder to set it to automatically run if the monitored file is present, available, or absent. If you set the Trigger on a Folder, all Jobs in the Folder will inherit the Trigger.

You will need to create a Credential in JAMS that has access to the location of the file that will be monitored.

  1. Click Definitions from the Shortcuts menu.
  2. Right-click a Job or Folder and select Properties.
  3. Click the Schedule tab.
  4. Click +.
  5. Select Run this job | based on a file.
  6. In the Schedule For Date field, enter a date when the Job should run.
  7. In the Scheduled Time field, enter the time when the Job should run.
  8. In the Credentials field, select the Credentials that have access to the file location.
  9. In the File Name field, enter the file path and the name of the file that will be monitored.
  10. In the File Presence Option field, select Present, Available, or Absent.
  11. In the Recursive field, select or clear the checkbox to have JAMS look in any subfolders for the file.
  12. In the Agent field, select the Agent where the file watch will occur.
  13. Set any additional Override properties to control the Job as needed. See the table below.
  14. Click Finish. The Trigger is listed under the Run this job section on the Schedule tab.
  15. Click Save and Close.

File Trigger Properties

Status Description
Enabled Select or clear this checkbox to enable or disable a, Trigger. When this option is disabled, this Trigger will not cause the Job to run.
Schedule Description
Schedule For Date

This property specifies the date the Job is scheduled to run. If you do not specify a date, the Job will run today at the time specified in the Scheduled Time property.

NOTE: If neither property is set, the Job will run immediately if not set in either place.
Scheduled Time

This property specifies the time of day when the Job is scheduled to run. If you do not specify a time, the Job will run at the current time and on the day specified in the Schedule For Date property.

NOTE: If neither property is set, the Job will run immediately if not set in either place.
Trigger Description
And Group

All the Triggers in the same "And Group" must fire before the Job is triggered.

If you leave the And Group empty, it creates a group with a blank name. All Triggers that have an empty And Group are put into this group and the Job will not run until all Triggers in this group are satisfied.

File Watch Description
Credentials Select a set of Credentials for this Trigger. The credentials must have access to the file location.
File Name This property specifies the file specification to that will be monitored. You can enter the path and file name, such as \\Server\Share\*.txt or C:\WatchFiles\Job1.trg” Wildcards are allowed.
File Presence Option This property specifies if the file must be present, absent, or available.
Minimum Size This property specifies a minimum acceptable size for the file. This is useful if the is being written by multiple processes.
Recursive This property specifies whether to perform this action recursively (used for directories).
Agent This property specifies the Agent where the file watch will be performed.
Override Description
Execute As This property specifies the set of credentials the Job will execute as when submitted by this Trigger.
Agent This property specifies the Agent where the Job will execute when the Job is submitted by this Trigger.
Batch Queue This property specifies the Batch Queue that will be used when this Job is scheduled by this Trigger.
Submit On Hold Select or clear this checkbox to submit the Job on Hold when it is scheduled by this Trigger. The Job will require manual intervention before it is allowed to run.
Comment This property specifies a comment that will be added to the entry when it is submitted by this Trigger.

Running a Job based on a Variable

You can add a Variable Trigger to a Job or a Folder to set it to automatically run when the value of the Variable changes. If you set the Trigger on a Folder, all Jobs in the Folder will inherit the Trigger.

  1. Click Definitions from the Shortcuts menu.
  2. Right-click a Job or Folder and select Properties.
  3. Click the Schedule tab.
  4. Click +.
  5. Select Run this job | based on a Variable.
  6. In the Schedule For Date field, enter a date when the Job should run.
  7. In the Scheduled Time field, enter a time when the Job should run.
  8. In the Compare Condition field, select an option to set how the Variable will be compared with the changed value.
  9. In the Compare Value field, enter a value that will be used to compare the existing value of the Variable.
  10. In the Variable field, select the Variable that will be monitored.
  11. Set any additional Override properties to control the Job as needed. See the table below.
  12. Click Finish. The Trigger is listed under the Run this job section on the Schedule tab.
  13. Click Save and Close.

Variable Trigger Properties

NOTE: A Variable Trigger is evaluated and can run only when the value of the variable has changed, even if the Trigger conditions are currently true. Changing the Job will not cause a Trigger to be evaluated.
Status Description
Enabled Select or clear this checkbox to enable or disable a Trigger. When this option is disabled, this Trigger will not cause the Job to run.
Schedule Description
Schedule For Date

The date the Job is scheduled to run. If you do not specify a date, the Job will run today at the time specified in the Scheduled Time property.

NOTE: If neither property is set, the Job will run immediately if not set in either place.
Scheduled Time

The time of day when the Job is scheduled to run. If you do not specify a time, the Job will run at the current time and on the day specified in the Schedule For Date property.

NOTE: If neither property is set, the Job will run immediately if not set in either place.
Trigger Description
And Group All the Triggers in the same “And Group” must fire before the Job is triggered. If you leave the And Group empty, it creates a group with a blank name. All Triggers that have an empty And Group are put into this group and the Job will not run until all Triggers in this group are satisfied.
Completion Description
Compare Condition This property specifies the type of comparison that should be performed. The available options include changed, equal, less than, greater than, less than equal, greater than equal, not equal, false, or true.
Compare Value This property specifies the value used in the condition comparison.
Value Description
Variable This property specifies the JAMS Variable that contains the default value.
Override Description
Submit On Hold Submits the Job on Hold when it is scheduled by this Trigger. The Job will require manual intervention before it is allowed to run.

Running a Job Based on an Email

You can add an email Trigger to a Job or a Folder to set it to automatically run based on a monitored email. If you set the Trigger on a Folder, all Jobs in the Folder will inherit the Trigger.

If you are using Microsoft Office 365 Modern Authentication, ensure you have created an EWS Connection Store object and a new Credential in JAMS for the email address/mailbox. Only EWS Connections Store objects can be used for Modern Authentication. See Connections to Mail Servers for more information.

  1. Click Definitions from the Shortcuts menu.
  2. Right-click a Job or Folder and select Properties.
  3. Click the Schedule tab.
  4. Click +.
  5. Select Run this job | based on an email.
  6. In the Schedule For Date field, enter a date when the Job should run.
  7. In the Mail Server field, enter the server name of the mail server.
  8. In the Mail Credentials field, enter the Credentials that are used to access the mail server.
  9. In the Subject field, enter the text in the subject line that will be used as part of the mail watch Job.
  10. In the From Address field, enter the email address that the mail watch Job will watch for.
  11. In the To Address field, enter the email address that the mail watch Job will watch for.
  12. Set any additional Override properties to control the Job as needed. See the table below.
  13. Click Finish. The Trigger is listed under the Run this job section on the Schedule tab.
  14. Click Save and Close.

Mail Trigger Properties

Status Description
Enabled Select or clear this checkbox to enable or disable a Trigger. When this option is disabled, this Trigger will not cause the Job to run.
Schedule Description
Schedule For Date

This property specifies the date the Job is scheduled to run. If you do not specify a date, the Job will run today at the time specified in the Scheduled Time property.

NOTE: If neither property is set, the Job will run immediately if not set in either place.
Scheduled Time

This property specifies the time of day when the Job is scheduled to run. If you do not specify a time, the Job will run at the current time and on the day specified in the Schedule For Date property.

NOTE: If neither property is set, the Job will run immediately if not set in either place.
Trigger Description
And Group

All the Triggers in the same "And Group" must fire before the Job is triggered.

If you leave the And Group empty, it creates a group with a blank name. All Triggers that have an empty And Group are put into this group and the Job will not run until all Triggers in this group are satisfied.

Mail Server Description
Mail Server This property sets the Connection Store object that specifies the mail server to use when sending e-mail. For Modern Authentication, select the EWS Connection Store object.
Mail Credentials This property specifies the Credentials used to access the mail server and the email account that will be monitored. These mail Credentials override the mail Credentials on the Connection Store object. Otherwise, the mail Credentials on the Connection Store object are used.
Disposition Description
Mark as Read When this option is set to true, the e-mail will be marked as read when the trigger runs.
Delete E-Mail When this option is set to true, the e-mail will be deleted from the mail server when the trigger runs.
Mail Selection Description
Subject This property specifies the subject of the e-mail that JAMS will watch for to trigger the Job. If the Subject contains the specified text regardless of the capitalization, the criteria for this trigger will be met.
From Address This property specifies the from address for the email that JAMS will watch for to trigger the Job.
To Address This property specifies an address to look for in the To: field of the email that JAMS will watch for to trigger the Job.
Override Description
Execute As This property specifies the set of credentials the Job will execute as when submitted by this Trigger.
Agent This property specifies the Agent where the Job will execute when the Job is submitted by this Trigger.
Batch Queue This property specifies the Batch Queue that will be used when this Job is scheduled by this Trigger.
Submit On Hold Select or clear this checkbox to submits the Job on Hold when it is scheduled by this Trigger. The Job will require manual intervention before it is allowed to run.
Comment This property specifies a comment that will be added to the entry when it is submitted by this Trigger.

Running a Job Based on a Recurrence (Same Monitor Entry)

You can add a Recurrence option to a Job to set it to run repeatedly. A recurrence gives you more granular control than an Interval Trigger. For example, you can set a Recurrence option to run the Job every hour from 8am to 5pm. You can also set this to run daily or only on weekdays/workdays.

The same Monitor Entry will be resubmitted, so the number will not change. This is useful to keep the list of Entries in the Monitor view smaller because the same Entry/number is reused.

  1. Click Definitions from the Shortcuts menu.
  2. Right-click a Job and select Properties.
  3. Click the Schedule tab.
  4. Click +.
  5. Select Run this job | based on a recurrence (same Monitor Entry).
  6. In the Delay field, enter the time/interval between each recurrence of the Job.
  7. In the EndTime field, enter the time of day when the recurrence is set to end. This value can be left blank to use the default of midnight.
  8. In the BaseTime field, select the value that is used to determine the next recurrence of the Job.
    • EndTime – The completion time of the Entry.
    • ScheduledTime – The Scheduled time of the Job.
    • StartTime – The actual start time of the Job.
  9. In the Repeat On Error field, select the desired recurrence action if the Job fails.
  10. Click Finish. The Trigger is listed under the Run this job section on the Schedule tab.
  11. Click Save and Close.

Recurrence (Same Monitor Entry) Properties

Status Description
Enabled Select or clear this checkbox to enable or disable a Trigger. When this option is disabled, this Trigger will not cause the Job to run.
Started This property is a read-only field that displays when the recurrence has started. It is updated in the Monitor Entry view only after the Job has been submitted.
Will Stop Repeating This property is a read-only field that displays when the recurrence will stop. It is updated in the Monitor Entry view only after the Job has been submitted.
Repeat Description
Delay Enter the time/interval between each recurrence of the Job.
End Time Enter the time of day when the recurrence is set to end. This value can be left blank to use the default of midnight.
Base Time Select the value that is used to determine the next recurrence of the Job.
  • EndTime – The completion time of the Entry.
  • ScheduledTime – The Scheduled time of the Job.
  • StartTime – The actual start time of the Job.
Resubmit on Error Select or clear the checkbox to set if the Job should continue to resubmit after a Job failure.

Running a Job Based on a Recurrence (New Monitor Entry)

You can add a Recurrence option to a Job to set it to run repeatedly. A recurrence gives you more granular control than an Interval Trigger. For example, you can set a Recurrence option to run the Job every hour from 8am to 5pm. You can also set this to run daily or only on weekdays/workdays.

A new Monitor Entry will be submitted, so the number will change. This is useful because the Entries may be easier to track because each one has a unique Entry number for each Job execution.

  1. Click Definitions from the Shortcuts menu.
  2. Right-click a Job and select Properties.
  3. Click the Schedule tab.
  4. Click +.
  5. Select Run this job | based on a recurrence (new Monitor Entry).
  6. In the Delay field, enter the time/interval between each recurrence of the Job.
  7. In the EndTime field, enter the time of day when the recurrence is set to end. This value can be left blank to use the default of midnight.
  8. In the BaseTime field, select the value that is used to determine the next recurrence of the Job.
    • EndTime – The completion time of the Entry.
    • ScheduledTime – The Scheduled time of the Job.
    • StartTime – The actual start time of the Job.
  9. In the Resubmit On Error field, select the desired recurrence action if the Job fails.
  10. Click Finish. The Trigger is listed under the Run this job section on the Schedule tab.
  11. Click Save and Close.

Recurrence (New Monitor Entry) Properties

Status Description
Enabled Select or clear this checkbox to enable or disable a Trigger. When this option is disabled, this Trigger will not cause the Job to run.
Started This property is a read-only field that displays when the recurrence has started. It is updated in the Monitor Entry view only after the Job has been submitted.
Will Stop Repeating This property is a read-only field that displays when the recurrence will stop. It is updated in the Monitor Entry view only after the Job has been submitted.
Repeat Description
Delay Enter the time/interval between each recurrence of the Job.
End Time Enter the time of day when the recurrence is set to end. This value can be left blank to use the default of midnight.
Base Time Select the value that is used to determine the next recurrence of the Job.
  • EndTime – The completion time of the Entry.
  • ScheduledTime – The Scheduled time of the Job.
  • StartTime – The actual start time of the Job.
Repeat on Error Select or clear the checkbox to set if the Job should continue to repeat after a Job failure.

Related Topics