Home โ€บ DevOps โ€บ AutoSys max_run_alarm, min_run_alarm and term_run_time: Alert on a Long-Running Job
Intermediate 3 min · November 15, 2026

AutoSys max_run_alarm, min_run_alarm and term_run_time: Alert on a Long-Running Job

A running AutoSys job never fails, so a job stuck for 6 hours raises no alert.

N
Naren Founder & Principal Engineer

20+ years shipping production infrastructure and CI/CD at scale. Notes here come from systems that actually shipped.

Follow
✓ Production
production tested
November 15, 2026
last updated
2,132
articles · all by Naren
Before you start⏱ 6 min
  • ✓AutoSys JIL basics
 ● Production Incident 🔎 Debug Guide
⚡Quick Answer
  • RUNNING never fails, so a hung job raises nothing by default.
  • max_run_alarm: 90 = MAXRUNALARM after 90 minutes; the job keeps running.
  • term_run_time: 240 = AutoSys kills the job after 240 minutes; status TERMINATED.
  • min_run_alarm: 10 = MINRUNALARM if the job completes in under 10 minutes.
  • Base the limits on run history: alarm at about 2x the usual run, kill well past it.
  • Only use term_run_time on jobs that are safe to rerun.
  • Route the alarms to email, chat or tickets; an alarm nobody sees doesn't help.
โœฆ Definition~90s read
What is AutoSys max_run_alarm and term_run_time?

max_run_alarm, min_run_alarm and term_run_time are AutoSys job attributes measured in minutes. max_run_alarm raises a MAXRUNALARM when a job runs longer than the limit, but lets it keep running. min_run_alarm raises a MINRUNALARM when a job completes faster than the limit. term_run_time terminates the job when it runs longer than the limit, so it ends in TERMINATED.

โ˜…
A job that hangs isn't broken in AutoSys's eyes, it's just busy.
Plain-English First

A job that hangs isn't broken in AutoSys's eyes, it's just busy. max_run_alarm is a kitchen timer that rings but leaves the oven on. term_run_time turns the oven off. min_run_alarm rings if dinner was 'ready' suspiciously fast.

EOD_POSTING normally runs for 40 minutes. One night it hung on a database lock and was still RUNNING at 07:00, when the morning reports missed their SLA. Nothing alerted, because nothing failed. Three attributes fix that.

Why a Hung Job Raises Nothing

AutoSys alarms on failures and terminations. A job blocked on a lock is still RUNNING, so it never matches an alarm condition unless you give it a time limit.

find.shBASH
1
2
autorep -J ALL -s | grep ' RU '
# EOD_POSTING   11/14 01:00   RU   <- six hours old
๐ŸŽฏ Key Takeaway
RUNNING is never an alarm by itself.

max_run_alarm: Warn, Don't Kill

Set in minutes. When the job runs past it, AutoSys raises MAXRUNALARM. The job keeps running.

alarm.jilJIL
1
2
update_job: EOD_POSTING
max_run_alarm: 90
๐ŸŽฏ Key Takeaway
Alert at about 2x the usual run.

term_run_time: Kill a Runaway

Set in minutes. Past it, AutoSys terminates the job and it ends in TERMINATED, so your failure handling and dependencies react.

kill.jilJIL
1
2
update_job: EOD_POSTING
term_run_time: 240
โš  Partial work
A killed job may have written half its output. Make sure a rerun is safe before you set term_run_time.
๐ŸŽฏ Key Takeaway
Kill only jobs that are safe to rerun.

min_run_alarm: Too Fast Is Suspicious

A 40-minute job that succeeds in 2 minutes usually processed nothing: an empty input file or a skipped step.

min.jilJIL
1
2
update_job: EOD_POSTING
min_run_alarm: 10
๐ŸŽฏ Key Takeaway
MINRUNALARM catches empty runs.

Pick the Numbers

Use the job's run history (WCC, or autorep with -r for past runs). Set max_run_alarm at about twice the usual run and term_run_time well past that.

all.jilJIL
1
2
3
4
update_job: EOD_POSTING
max_run_alarm: 90
min_run_alarm: 10
term_run_time: 240
๐ŸŽฏ Key Takeaway
Limits come from history, not guesses.
● Production incidentPOST-MORTEMseverity: high

Six Hours in RUNNING

Symptom
RPT_MORNING sat waiting on EOD_POSTING; autorep showed EOD_POSTING in RU since 01:00.
Assumption
The team assumed any problem would show up as a failure alarm.
Root cause
The job had no run-time limits. A hung job stays RUNNING, which is not an alarm condition.
Fix
Added max_run_alarm: 90, term_run_time: 240 and min_run_alarm: 10, and routed MAXRUNALARM to the on-call channel.
Key lesson
  • Running isn't failing.
  • Set alarms from run history.
  • Kill only jobs that are safe to rerun.
Production debug guideIs anything running too long?3 entries
Symptom · 01
Downstream jobs waiting for hours
→
Fix
autorep -J ALL -s | grep ' RU ' and look for old start times.
Symptom · 02
Job finished but output is empty
→
Fix
Compare its run time with history; add min_run_alarm.
Symptom · 03
Alarm raised, nobody noticed
→
Fix
Check where alarms are routed: WCC alerts alone are easy to miss.
⚙ Quick Reference
5 commands from this guide
FileCommand / CodePurpose
find.shautorep -J ALL -s | grep ' RU 'Why a Hung Job Raises Nothing
alarm.jilupdate_job: EOD_POSTINGmax_run_alarm
kill.jilupdate_job: EOD_POSTINGterm_run_time
min.jilupdate_job: EOD_POSTINGmin_run_alarm
all.jilupdate_job: EOD_POSTINGPick the Numbers

Key takeaways

1
RUNNING never alarms on its own.
2
max_run_alarm warns.
3
term_run_time kills.
4
min_run_alarm catches empty runs.
5
Base limits on history.

Common mistakes to avoid

3 patterns
×

No run-time limits on critical jobs

Symptom
Hung jobs found hours later.
Fix
max_run_alarm on every SLA job.
×

term_run_time on non-rerunnable jobs

Symptom
Half-written output after a kill.
Fix
Alarm only, or make the job idempotent.
×

Alarms only in WCC

Symptom
Nobody sees them at night.
Fix
Route to on-call.
INTERVIEW PREP · PRACTICE MODE

Interview Questions on This Topic

Q01SENIOR
What's the difference between max_run_alarm and term_run_time?
Q02SENIOR
Why use min_run_alarm?
Q01 of 02SENIOR

What's the difference between max_run_alarm and term_run_time?

ANSWER
max_run_alarm raises an alarm but lets the job run; term_run_time kills the job.
FAQ · 3 QUESTIONS

Frequently Asked Questions

01
How do I get an alert when an AutoSys job runs too long?
02
Does max_run_alarm stop the job?
03
What unit are these attributes in?
COMPLETE GUIDE
The Complete AutoSys Workload Automation Guide for Engineers →

JIL syntax, sendevent, autorep, box jobs, file watchers, scheduling, HA, security, cloud workload automation, and 22 interview questions โ€” the definitive AutoSys reference for production engineers.

N
Naren Founder & Principal Engineer

20+ years shipping production infrastructure and CI/CD at scale. Notes here come from systems that actually shipped.

Follow
✓ Verified
production tested
November 15, 2026
last updated
2,132
articles · all by Naren
🔥

That's AutoSys. Mark it forged?

3 min read · try the examples if you haven't

←
Previous
AutoSys Lookback Conditions: s(JOB, 0) vs s(JOB, hh.mm)
50 / 50 · AutoSys
Next
Introduction to Jenkins
→