Events and Notifications

Events and notifications are used to respond to executing or completed JAMS Jobs. Events may be configured to send notifications when Jobs fail or complete with any severity. Events and notifications can be used to handle standard and specific events in a variety of ways, including sending email notifications or running recovery processes/Jobs. These events and notifications rely on an event class to be set in a Schedule Item for a Job or Folder. For example, you can set use the Job Status option (Set this Job’s status to | runaway) to set the Notify Event Class property to Urgent. You can then configure one or more of the events/notifications listed in this article to watch for this Urgent event.

You can configure multiple event handlers, or notifications, for a single Job. You can add events and notifications to a Folder and they will be inherited by that Folder's child objects.

Send an Email after an Event

You can have an email sent to an address if a specified event occurs. For example, if a Job is set to a Runaway status and it has an event flag or finishes in failure, you can have an email sent to alert someone to review the Job in the Monitor. The email event/notification will watch for the matching event or the entry status, which are defined in the table below. For example, if a Stalled Job has an event class of Urgent selected, an email will be sent when the Urgent event occurs. See Job Status for more information on these events.

The Send Email item can be used to generate an email notification for any Schedule Item that sets an event flag. It can also be used to send email notifications when Jobs start, or complete with any specified Final Severity.

To ensure an email is sent, ensure the proper SMTP server configuration has been set up in the Configuration shortcut. See Defining the SMTP Server 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 When an event occurs | send an e-mail.
  6. In the Events section, select one or more statuses for the completed Entry in the Monitor or the Event that will trigger the email to be sent.
  7. In the To Address field, enter the email address where the email will be sent.
  8. In the Subject field, add a subject line for the email.
  9. In the Message Body field, click in the field to add the email message and click OK.
  10. In the From Address field, enter the email address that will be used as the sender.
  11. Click Finish. The Event is listed under the When an event occurs section on the Schedule tab.
  12. Click Save and Close.

E-Mail Event Properties

Status Description
Enabled Select or clear the checkbox to enable or disable the Event.
Events Description
Entry Success This property specifies if the email/event should be triggered after a successful completion status.
Entry Informational This property specifies if the email/event should be triggered after an information completion status.
Entry Warning This property specifies if the email/event should be triggered after a warning completion status.
Entry Error This property specifies if the email/event should be triggered after an error completion status.
Entry Fatal This property specifies if the email/event should be triggered after a fatal completion status.
Entry Started This property specifies if the email/event should be triggered after a Job has started to run.
Normal Event This property specifies if the email/event should be triggered after an event with the event class Normal occurs.
Low Event This property specifies if the email/event should be triggered after an event with the event class Low occurs.
Moderate Event This property specifies if the email/event should be triggered after an event with the event class Moderate occurs.
High Event This property specifies if the email/event should be triggered after an event with the event class High occurs.
Urgent Event This property specifies if the email/event should be triggered after an event with the event class Urgent occurs.
Critical Event This property specifies if the email/event should be triggered after an event with the event class Critical occurs.
E-Mail Description
To Address Enter a comma-separated list of email addresses that the email will be sent to. You can remove inherited addresses by prefixing the address with a minus sign (-). You can remove all inherited addresses by entering -*.
Subject This property specifies the subject of the email.
Message Body This property specifies the body of the email message. Users may enter Markdown language in the Message Body.
CC Address Enter a comma-separated list of email addresses that will be cc'd on the email. You can remove inherited addresses by prefixing the address with a minus sign (-). You can remove all inherited addresses by entering -*.
From Address This property specifies the sender’s email address used when sending the email from JAMS.
Send Plain Text Select the checkbox to send the email using only plain text. If the checkbox is cleared, html formatting is used. Note that if Send Plain Text is true, Markdown Language in the Message Body will not format properly.
Message Priority This property specifies the priority to use when the email is sent. You can select Normal, Low, or High.

Run a Notification Job after an Event

You can add a Schedule Item to run a Notification Job after a Job completes with a specified status, or after any events configured on the Job. This is useful to send a notification that contains more information than an email and a log file, as described in the Email Notification section above. It can also be used to automatically create tickets in 3rd party ITSM tools on Job failure. Any type of Job can be run as part of this notification.

  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 When an event occurs | run a Notification Job.
  6. In the Notification Job field, click … to select the Job to be used as the Notification Job.
  7. Click Ok.
  8. In the Events section, select one or more types of events that will trigger the Notification Job to run.
  9. Click Finish. The Event is listed under the When an event occurs section on the Schedule tab.
  10. Click Save and Close.

Notification Job Properties

Status Description
Enabled Select or clear the checkbox to enable or disable the Event.
Execute Description
Notification Job This property specifies the JAMS Job that runs when notification is required.
Events Description
Entry Success This property specifies if the event should be triggered after a successful completion status.
Entry Informational This property specifies if the event should be triggered after an information completion status.
Entry Warning This property specifies if the event should be triggered after a warning completion status.
Entry Error This property specifies if the event should be triggered after an error completion status.
Entry Fatal This property specifies if the event should be triggered after a fatal completion status.
Entry Started This property specifies if the event should be triggered after a Job has started to run.
Normal Event This property specifies if the event should be triggered after an event with the event class Normal occurs.
Low Event This property specifies if the event should be triggered after an event with the event class Low occurs.
Moderate Event This property specifies if the event should be triggered after an event with the event class Moderate occurs.
High Event This property specifies if the event should be triggered after an event with the event class High occurs.
Urgent Event This property specifies if the event should be triggered after an event with the event class Urgent occurs.
Critical Event This property specifies if the event should be triggered after an event with the event class Critical occurs.

Run a Recovery Job after an Event

You can add a Schedule Item to run a Recovery Job after a Job completes with a specified status. This is useful if you have Job that may occasionally fail for a predictable reason. This allows you to configure the Recovery Job to run a script and make the necessary updates or corrections. Recovery Jobs can only be triggered by the completion severity of the Job it is configured on.

  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 When an event occurs | run a Recovery Job.
  6. In the Recovery Job field, click to select the Job to run as the Recovery Job.
  7. Click Ok.
  8. In the Recovery Severity field, select the severity that will trigger the Recovery Job to run.
  9. Click Finish. The Event is listed under the When an event occurs section on the Schedule tab.
  10. Click Save and Close.

Recovery Job Properties

Status Description
Enabled Select or clear the checkbox to enable or disable the Event.
Execute Description
Recovery Job This property specifies the JAMS Job that should run when the current Job does not exceed the configured Recovery Severity.
Trigger Description
Recovery Severity This property specifies the maximum completion severity required to trigger the Recovery Job.