Skip to main content

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 is 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.

Depending on the type of mail server you are using, ensure one the following is set up:

  • An SMTP Connection Store item and a Credential to use with the SMTP Connection.
  • A Graph API Connection Store item and a Credential to use with the Graph API Connection.

See Connections to Mail Servers and Credentials for more information.

  1. Click Jobs from the main menu.
  2. Click a Folder.
  3. Click .
  4. Click Properties.
  5. Click Schedules.
  6. Expand When an event occurs.
  7. Click ADD.
  8. Select send an email.
  9. In the Name field, enter a name for this event.
  10. 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.
  11. In the To Address field, enter the email address where the email will be sent.
  12. In the Subject field, add a subject line for the email.
  13. In the Message Body field, click in the field to add the email message and click OK.
  14. In the Mail Server field, select the Connection Store item for the mail server.
  15. (Optional). Select the option for sending the message as plain text or set the message priority. See the table below for more information.
  16. Click Save. The Event is listed under the When an event occurs section on the Schedule tab.

Email Event Properties

StatusDescription
EnabledSelect or clear the checkbox to enable or disable the Event.
EventsDescription
Entry SuccessThis property specifies if the email/event should be triggered after a successful completion status.
Entry InformationalThis property specifies if the email/event should be triggered after an informational completion status.
Entry WarningThis property specifies if the email/event should be triggered after a warning completion status.
Entry ErrorThis property specifies if the email/event should be triggered after an error completion status.
Entry FatalThis property specifies if the email/event should be triggered after a fatal completion status.
Entry StartedThis property specifies if the email/event should be triggered after a Job has started to run.
Normal EventThis property specifies if the email/event should be triggered after an event with the event class Normal occurs.
Low EventThis property specifies if the email/event should be triggered after an event with the event class Low occurs.
Moderate EventThis property specifies if the email/event should be triggered after an event with the event class Moderate occurs.
High EventThis property specifies if the email/event should be triggered after an event with the event class High occurs.
Urgent EventThis property specifies if the email/event should be triggered after an event with the event class Urgent occurs.
Critical EventThis property specifies if the email/event should be triggered after an event with the event class Critical occurs.
EmailDescription
To AddressEnter 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 -*.
SubjectThis property specifies the subject of the email.
Message BodyThis property specifies the body of the email message. You may enter Markdown language in the Message Body.
CC AddressEnter 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 -*.
Mail ServerSelect the Connection from the Connection Store for the mail server to check for email.
Send Plain TextSelect 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 PriorityThis 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.

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 Jobs from the main menu.
  2. Click a Folder.
  3. Click .
  4. Click Properties.
  5. Click Schedules.
  6. Expand When an event occurs.
  7. Click ADD.
  8. Select run a Notification Job
  9. In the Name field, enter a name for the event.
  10. In the Notification Job field, click BROWSE to select the Job to be used as the Notification Job.
  11. Click SELECT.
  12. In the Events section, select one or more types of events that will trigger the Notification Job to run. See the table below for more information.
  13. Click Save. The Event is listed under the When an event occurs section on the Schedule tab.

Notification Job Properties

StatusDescription
EnabledSelect or clear the checkbox to enable or disable the Event.
ExecuteDescription
Notification JobThis property specifies the JAMS Job that runs when notification is required.
EventsDescription
Entry SuccessThis property specifies if the event should be triggered after a successful completion status.
Entry InformationalThis property specifies if the event should be triggered after an informational completion status.
Entry WarningThis property specifies if the event should be triggered after a warning completion status.
Entry ErrorThis property specifies if the event should be triggered after an error completion status.
Entry FatalThis property specifies if the event should be triggered after a fatal completion status.
Entry StartedThis property specifies if the event should be triggered after a Job has started to run.
Normal EventThis property specifies if the event should be triggered after an event with the event class Normal occurs.
Low EventThis property specifies if the event should be triggered after an event with the event class Low occurs.
Moderate EventThis property specifies if the event should be triggered after an event with the event class Moderate occurs.
High EventThis property specifies if the event should be triggered after an event with the event class High occurs.
Urgent EventThis property specifies if the event should be triggered after an event with the event class Urgent occurs.
Critical EventThis 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 Jobs from the main menu.
  2. Click a Folder.
  3. Click .
  4. Click Properties.
  5. Click Schedules.
  6. Expand When an event occurs.
  7. Click ADD.
  8. Select run a Recovery Job.
  9. In the Name field, enter a name for the event.
  10. In the Recovery Job field, click BROWSE to select the Job to run as the Recovery Job.
  11. Click SELECT.
  12. In the Recovery Severity field, select the severity that will trigger the Recovery Job to run.
  13. Click Save. The Event is listed under the When an event occurs section on the Schedule tab.

Recovery Job Properties

StatusDescription
EnabledSelect or clear the checkbox to enable or disable the Event.
ExecuteDescription
Recovery JobThis property specifies the JAMS Job that should run when the current Job does not exceed the configured Recovery Severity.
TriggerDescription
Recovery SeverityThis property specifies the maximum completion severity required to trigger the Recovery Job. The options are Success, Info, Warning, Error, and Fatal.