Home β€Ί DevOps β€Ί AutoSys Exit Code 15: Why Your Job Was Terminated (SIGTERM, term_run_time, KILLJOB)
Intermediate 3 min · November 06, 2026

AutoSys Exit Code 15: Why Your Job Was Terminated (SIGTERM, term_run_time, KILLJOB)

AutoSys exit code 15 usually means the job's process received SIGTERM (signal 15): term_run_time expired, someone sent KILLJOB, or the agent or host shut.

N
Naren Founder & Principal Engineer

20+ years shipping production infrastructure and CI/CD at scale. Everything here is grounded in real deployments.

Follow
✓ Production
production tested
November 07, 2026
last updated
2,128
articles · all by Naren
Before you start⏱ 6 min
  • ✓AutoSys JIL basics
 ● Production Incident 🔎 Debug Guide
⚡Quick Answer
  • Exit code 15 = the process got SIGTERM (signal 15), usually shown with status TERMINATED.
  • Most common cause: the job ran longer than its term_run_time, so AutoSys killed it.
  • Other causes: someone ran sendevent -E KILLJOB, the agent was restarted, or the host was shut down.
  • Find out which: autorep -J JOB -d shows the run and its events; check the event log for KILLJOB and compare run time with term_run_time (autorep -J JOB -q).
  • If a shell wrapper reports it, you may see 143 (128 + 15) instead: same cause.
  • Also check the script doesn't call exit 15 itself.
✦ Definition~90s read
What is AutoSys Exit Code 15?

Exit code 15 on an AutoSys job almost always means the process was stopped by signal 15, SIGTERM, rather than failing on its own. Something asked it to stop: AutoSys enforcing term_run_time, a KILLJOB event, or the agent or server shutting down. Occasionally the script itself calls exit 15.

β˜…
Exit code 15 is not your job tripping over; it's the job being tapped on the shoulder and told to leave.
Plain-English First

Exit code 15 is not your job tripping over; it's the job being tapped on the shoulder and told to leave. The work to do is find out who did the tapping: the timer (term_run_time), a person (KILLJOB), or the building closing (agent or host shutdown).

You open the job history and see TERMINATED with exit code 15. The script's log just stops mid-line with no error. That's the signature of SIGTERM: the job didn't fail, it was stopped. This guide shows how to find what stopped it in a couple of commands, and how to fix each cause.

What Exit Code 15 Means

On Unix, signal 15 is SIGTERM, the polite "please stop" signal. When an AutoSys job's process is ended by a signal, the job shows that signal number as its exit code and usually goes TERMINATED rather than FAILURE. So exit code 15 tells you the job was stopped from outside, and that the error message you're looking for won't be in the job's own log.

check_run.shBASH
1
2
3
4
5
# Last runs, with status and exit code
autorep -J FIN_EXTRACT -d

# The job's definition: look for term_run_time
autorep -J FIN_EXTRACT -q | grep -E 'term_run_time|max_run_alarm'
Output
Job Name Last Start Last End ST Run/Ntry Pri/Xit
FIN_EXTRACT 11/06/2026 02:00:04 11/06/2026 03:00:05 TE 1/1 15
term_run_time: 60
πŸ”₯143 is the same thing
If the job runs through a shell wrapper, you may see 143 (128 + 15). Treat it exactly like 15.
🎯 Key Takeaway
Exit code 15 = stopped by SIGTERM, not a failure inside the script.

Cause 1: term_run_time Expired

term_run_time is the number of minutes AutoSys lets a job run before killing it. It's the most common cause of exit code 15, and its signature is easy to spot: the job is killed at the same elapsed time on every bad run. Jobs that were fine for months start hitting it as data volume grows.

limits.jilTEXT
1
2
3
update_job: FIN_EXTRACT
max_run_alarm: 75     /* alert at 75 min */
term_run_time: 120    /* kill only at 120 min */
πŸ’‘Alert before you kill
Set max_run_alarm below term_run_time so someone hears about a slow run before AutoSys ends it.
🎯 Key Takeaway
Same elapsed time on every kill = term_run_time.

Cause 2: Someone Sent KILLJOB

sendevent -E KILLJOB stops a running job, and the process typically sees SIGTERM. If the kill time doesn't match any limit, check the event history for a KILLJOB on that job, which also shows when it was sent. Operators often kill a job that looks hung without telling the owning team.

who_killed.shBASH
1
2
3
4
5
# Recent events for the job (look for KILLJOB)
autorep -J FIN_EXTRACT -d

# What a manual kill looks like
sendevent -E KILLJOB -J FIN_EXTRACT
🎯 Key Takeaway
A random kill time usually means a person or script sent KILLJOB.

Cause 3: The Agent or Host Went Down

When a server is rebooted or the AutoSys agent is restarted, running processes get SIGTERM. The clue is scale: several jobs on the same machine all end with exit code 15 within a minute or two. Check the agent log and the host's uptime, and agree maintenance windows with the batch schedule.

host_check.shBASH
1
2
3
4
# On the agent machine
uptime
# Jobs that ran on this machine around the kill time
autorep -M finbatch01
🎯 Key Takeaway
Many jobs, one machine, same minute = agent or host shutdown.

Make the Script Survive a SIGTERM

Whatever the cause, a killed job can leave half-written files that the next run picks up. Trap SIGTERM in the script to clean up and exit with a clear message, so the log shows the job was stopped from outside.

extract.shBASH
1
2
3
4
5
6
7
8
9
#!/bin/bash
cleanup() {
  echo "$(date) received SIGTERM, removing partial output" >&2
  rm -f /data/out/extract.tmp
  exit 15
}
trap cleanup TERM

run_extract > /data/out/extract.tmp && mv /data/out/extract.tmp /data/out/extract.csv
🎯 Key Takeaway
Trap TERM so a kill leaves a clear log line and no partial output.
● Production incidentPOST-MORTEMseverity: high

Killed at 03:00, Every Night

Symptom
FIN_EXTRACT went TERMINATED with exit code 15, always about 60 minutes after it started. The log ended mid-batch with no error.
Assumption
The team assumed the database was dropping the connection and spent two nights chasing network timeouts.
Root cause
The job had term_run_time: 60. Data volume had grown, so the extract now needed about 70 minutes, and AutoSys sent SIGTERM when the 60-minute limit was reached.
Fix
Raised term_run_time from the run-time history (with headroom), added max_run_alarm so the team is alerted before the kill, and made the script trap SIGTERM to clean up partial files.
Key lesson
  • Exit code 15 means something stopped the job; look for the sender, not a bug.
  • A kill at the same elapsed time each run points to term_run_time.
  • Set limits from real run history, and alert before you kill.
Production debug guideFind who sent the signal5 entries
Symptom · 01
Killed at the same elapsed time every run
→
Fix
Compare the run time in autorep -J JOB -d with term_run_time from autorep -J JOB -q. If they match, the limit killed it.
Symptom · 02
Killed at a random time
→
Fix
Search the event log for a KILLJOB event on that job, and check who issued it.
Symptom · 03
Many jobs on one machine killed at once
→
Fix
The agent or host restarted or shut down. Check the agent log and the server's uptime.
Symptom · 04
Exit code 143 instead of 15
→
Fix
Same signal: a wrapper shell reports 128 + 15. Investigate the same causes.
Symptom · 05
No kill, no limit, no restart
→
Fix
grep the script for 'exit 15' or a command that returns 15 on its own.
⚙ Quick Reference
5 commands from this guide
FileCommand / CodePurpose
check_run.shautorep -J FIN_EXTRACT -dWhat Exit Code 15 Means
limits.jilupdate_job: FIN_EXTRACTCause 1
who_killed.shautorep -J FIN_EXTRACT -dCause 2
host_check.shuptimeCause 3
extract.shcleanup() {Make the Script Survive a SIGTERM

Key takeaways

1
Exit code 15 means the process received SIGTERM.
2
Same elapsed time on every kill points to term_run_time.
3
A random time points to KILLJOB; many jobs at once points to the host.
4
Exit code 143 is the same signal through a shell.
5
Set max_run_alarm below term_run_time, and trap TERM in scripts.

Common mistakes to avoid

3 patterns
×

Debugging the script's logic

Symptom
Hours spent on code that never errored.
Fix
Exit code 15 means it was stopped. Check term_run_time, KILLJOB and the host first.
×

Setting term_run_time from a guess

Symptom
Jobs killed as data grows.
Fix
Base it on run-time history, with headroom, and review it when volumes change.
×

No max_run_alarm

Symptom
The first anyone hears of a slow job is the kill.
Fix
Alert below the kill limit.
INTERVIEW PREP · PRACTICE MODE

Interview Questions on This Topic

Q01SENIOR
An AutoSys job shows TERMINATED with exit code 15. What do you check?
Q02SENIOR
What's the difference between max_run_alarm and term_run_time?
Q01 of 02SENIOR

An AutoSys job shows TERMINATED with exit code 15. What do you check?

ANSWER
That's SIGTERM, so something stopped it. Compare run time with term_run_time, look for a KILLJOB event, and check whether the agent or host restarted.
FAQ · 3 QUESTIONS

Frequently Asked Questions

01
What does exit code 15 mean in AutoSys?
02
Is exit code 15 the same as 143?
03
How do I stop AutoSys killing a long job?
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. Everything here is grounded in real deployments.

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

That's AutoSys. Mark it forged?

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

←
Previous
AutoSys: Pass a Dynamic Parameter to a Job
33 / 49 · AutoSys
Next
AutoSys: Run a Dependent Job N Minutes After the Main Job
→