JAMS Scheduler: What happens after a restart
When someone restarts a failed JAMS Scheduler job, from the alert or directly in the scheduler, the people who were paged need to know whether it worked. JAMS Incident Management follows the restarted job and tells them.
| The restarted job… | What happens |
|---|---|
| Fails again | It pages as a new alert, titled "…has failed again after a restart", with the same job actions. The first alert stops escalating. |
| Completes | The people who were paged get a "completed after a restart" notice, with Acknowledge only. The first alert stops escalating. |
Both are on by default, and each can be switched off per Connection.
Why "fails again" matters
Every JAMS Connection has a cooldown (15 minutes by default) that stops the same job paging over and over. Before this, a restarted job that failed again inside the cooldown sent nothing: the person who restarted it reasonably assumed it had worked. A failure after a restart now always pages, whatever the cooldown.
How it recognises a restart
A restart releases the JAMS Scheduler entry to run again. JAMS keeps the same entry number and adds 1 to the entry's restart count. So a later failure or success for an entry we already alerted on is the restarted job.
- Restarts done in JAMS Scheduler count too. It doesn't matter where the job was restarted.
- A workflow Retry runs the step as a new entry. It's matched by the workflow and the step's name instead.
- JAMS Scheduler's own automatic retries also raise the restart count. They're only treated as a restart when we'd already alerted on that entry, which is exactly when someone wants to know.
Set it up
"Fails again": nothing to do
It works with every version of the Notification Job snippet, including the one you pasted before this feature existed.
"Completes": two changes
JAMS Scheduler normally runs the Notification Job only when a job fails, so it has to be told about successes too:
- Re-paste the snippet. In JAMS Incident Management, open the Connection's Show Snippet, copy it, and replace the source of your Notification Job in JAMS Scheduler. The current snippet reports a success only for a restarted run, so ordinary successful runs never call JAMS Incident Management.
- Tick Success on the Notification Job in JAMS Scheduler, alongside Error and Fatal.
Tick Success only where you want the notice. With Success ticked, JAMS runs the Notification Job after every successful run. The snippet stops straight away unless the job was restarted, so nobody is notified, but each run is still an extra entry in JAMS history. On a busy server, tick Success on the jobs or folders where a "completed after a restart" notice matters, not server-wide. "Fails again" needs only Error and Fatal.
A completed workflow Retry isn't reported, because the retried step is a new entry that has never been restarted. A Retry that fails again still pages.
Turn either one off
- Go to /integrations/jams and click Edit on the Connection.
- Under After a restart, untick Notify when the restart fails again or Notify when the restart completes.
- Save.
With fails again off, a restart's failure sends nothing, so only the first failure of a run pages. With completes off, the first alert still stops escalating when the restarted job completes; nobody is notified.
If the Agent is slow to confirm
When the Agent hasn't confirmed an action within the call, the caller hears "JAMS hasn't confirmed the restart yet. The alert stays open; please check the job in JAMS." The alert keeps escalating until someone acknowledges it, or the restart's outcome arrives as above.