AX2543

Setting up email notification for jobs

Scheduler can be configured to send an email notification when a job completes, or when a job has errors. In order for an email to be sent for a particular job, the following must be set up:

  • The job must be configured to send a notification on completion or error. The notification settings must include valid To and From email addresses (or use system variables).
  • The System.SMTPMessageDelivery system job must be configured with a valid SMTP server for your environment. For more information, see Configuring Scheduler system jobs.

When a job creates an email notification, the notification is first saved to the database. When notifications are detected in the database, the System.SMTPMessageDelivery system job is triggered to deliver the notifications.

NOTE: By default, all new Scheduler jobs are configured to send notification on completion, to the user who created the job. You only need to edit these settings if you want to change the default settings.

To configure a job to send email notifications:

  1. In the Scheduler dialog, open a job to edit or create a new one.

  2. In the left-hand side of the job, select Notification.

  3. In the Job Notification Level section, select one of the following:

    • Send all email notifications: (Default) An email notification is always sent when the job is executed, regardless of the job status (success, failure, aborted, etc.).

    • Send email notification only when the job has errors: An email notification is only sent if the job experiences errors. If the job completes successfully with no errors, no email notification is sent.

    • None: No email notifications are sent for this job. The only way to check the status of the job execution is to check the job history.

    • Send email notification to different email addresses when the job has errors or succeeds: This option works the same way as Send all email notifications, except that a separate email address can be specified to receive the error notifications.

  4. In the Notification Message Content section, complete the following for the notification email:

    Item Description

    To

    The email address(es) to receive the notification email. Separate multiple addresses with a semicolon.

    By default, this is set to notify the user who executed the job, using the system variable {CurrentUser.EmailAddress}.

    When using Send email notification to different email addresses when the job has errors or succeeds, this user will be notified if the job completes successfully (including partial success), but not if the job fails. Job failure notifications are sent to the To (on error) recipients.

    From

    The email address that the message is sent from. This can be something like axiomscheduler@company.com, so that the recipient can easily tell that the message has been generated by Scheduler.

    By default, this is set to the Scheduler "from" email address as defined in the system configuration settings, using the system variable {Scheduler.FromEmailAddress}.

    NOTE: For installations that are using subsystems, the system variable {Scheduler.FromEmailAddress} may resolve to a subsystem administrator email address instead of the Scheduler "from" email address. For more information, see Using job variables.

    Subject

    The subject of the message. By default, this is set to "Axiom Scheduler Notification."

    User Message

    Optional body text for the email. This text is included in addition to the Scheduler auto-generated text regarding the job status.

    If Send email notification to different email addresses when the job has errors or succeeds is enabled, the following additional options are available:

    Item Description

    To (on error)

    The email address(es) to receive the notification email when the job result is Failed. Separate multiple addresses with a semicolon.

    This user only receives a notification if the job fails. If the job result is Success or Partial Success, this user will not receive a notification (only the To user will).

    Subject (on error)

    The subject of the job failure message. By default, this is set to "Axiom Scheduler Notification."

    Job variables can be used in the notification settings. For more information, see Using job variables.

When this job is executed, it will generate an email notification according to the defined settings, and save that notification to the database to await delivery.