JIL Attributes Complete Reference — Every Key AutoSys Job Attribute
- Always set std_out_file and std_err_file on every CMD job — they are your primary debugging tools
- date_conditions: 1 must be set for start_times to take effect — without it, time-based scheduling is disabled
- n_retrys: 3 means 3 retries after initial failure — the job runs up to 4 times total
A JIL job definition can contain a large number of attribute statements, each controlling a different aspect of how the job behaves. You don't need to memorise all of them, but you do need to know the commonly used ones by heart and know where to find the rest.
This article covers every attribute you'll encounter in production AutoSys environments, grouped by what they control. Each attribute includes its purpose, valid values, and a note on when it matters.
Identity attributes
These attributes define the basic identity of the job.
insert_job: my_job_name /* unique name in this AutoSys instance */ job_type: CMD /* CMD, BOX, or FW */ description: "What this job does" /* free text, shows in WCC */ owner: batchuser /* OS user the command runs as */ machine: prod-server-01 /* agent machine where job executes */ permission: gx,ge,wx,we,mx,me /* who can view/edit/run this job */
Scheduling attributes
These attributes control when the job runs.
/* Enable time-based scheduling (must be 1 for start_times to apply) */ date_conditions: 1 /* Days of week: all, mon-fri, or specific days like mon,wed,fri */ days_of_week: mon-fri /* Time(s) to start — multiple times separated by comma */ start_times: "02:00, 14:00" /* Date(s) to run — specific dates for one-off scheduling */ run_calendar: eom_calendar /* run on calendar-defined days */ exclude_calendar: holidays /* skip these calendar dates */ /* Run window — job must complete within this time range */ run_window: "22:00 - 06:00" /* Timezone for time interpretation */ timezone: US/Eastern
Dependency and condition attributes
These attributes define what must be true before this job can start.
/* Start condition — use success(), failure(), done(), notrunning() */ condition: success(upstream_job) /* Multiple conditions — AND is implied between them */ condition: success(job_a) AND success(job_b) /* OR condition */ condition: success(job_a) OR success(job_b) /* Box membership */ box_name: parent_box_name /* links this job into a box */ /* Priority — higher number = higher priority when resources are constrained */ job_load: 10 /* how much machine capacity this job uses */ max_run_alarm: 60 /* alert if running longer than 60 minutes */ min_run_alarm: 5 /* alert if completed faster than 5 minutes */
Output and logging attributes
Always set these. Debugging any AutoSys job failure without log files is extremely painful.
/* Standard output file path */ std_out_file: /logs/autosys/my_job.out /* Standard error file path */ std_err_file: /logs/autosys/my_job.err /* Append to existing log instead of overwrite */ std_out_file: >/logs/autosys/my_job.out /* > prefix means append */ /* Send output to syslog */ std_out_file: \$AUTOUSER/out/syslog.txt
Failure handling and retry attributes
These attributes control what happens when a job doesn't succeed on its first attempt.
/* Number of automatic retries before declaring FAILURE */ n_retrys: 3 /* Raise an alarm if job fails */ alarm_if_fail: 1 /* Maximum runtime in minutes before AutoSys terminates the job */ term_run_time: 90 /* Mark this job as a 'box terminator' — if it fails, fail the whole box */ box_terminator: 1 /* Mark this job as a 'job terminator' — if it fails, the job itself terminates */ job_terminator: 1 /* Send notification email on failure */ notification: mail notification_emailaddress: oncall-team@company.com notification_msg: "Job %s failed on machine %m at %t"
| Attribute | What it controls | Required? | Default if omitted |
|---|---|---|---|
| job_type | CMD, BOX, or FW | Yes | None — must specify |
| machine | Which agent runs the job | Yes (CMD/FW) | None |
| owner | OS user to run as | Yes | None |
| date_conditions | Enable time-based scheduling | No | 0 (disabled) |
| start_times | When to start | If date_conditions=1 | None |
| condition | Dependency on other jobs | No | None (no dependency) |
| n_retrys | Automatic retry count | No | 0 (no retries) |
| alarm_if_fail | Alert on failure | No | 0 (no alert) |
| term_run_time | Kill after N minutes | No | None (no limit) |
| std_out_file | Stdout log path | No | None (stdout discarded) |
| std_err_file | Stderr log path | No | None (stderr discarded) |
🎯 Key Takeaways
- Always set std_out_file and std_err_file on every CMD job — they are your primary debugging tools
- date_conditions: 1 must be set for start_times to take effect — without it, time-based scheduling is disabled
- n_retrys: 3 means 3 retries after initial failure — the job runs up to 4 times total
- term_run_time terminates a hung job after N minutes — critical for preventing downstream job pile-ups
⚠ Common Mistakes to Avoid
- ✕Not setting std_out_file and std_err_file — makes failures very difficult to diagnose
- ✕Setting date_conditions: 0 (or omitting it) and then setting start_times — start_times is ignored when date_conditions is 0
- ✕Forgetting that n_retrys: 3 means 3 retries AFTER the initial failure — the job runs up to 4 times total
- ✕Not setting term_run_time — a job that hangs forever will block downstream jobs indefinitely
- ✕Setting alarm_if_fail: 0 (the default) and then wondering why nobody was notified when the job failed
Interview Questions on This Topic
- QWhat does the date_conditions attribute do in AutoSys JIL?
- QWhat is the difference between n_retrys and restarting a job manually?
- QWhat attributes control failure notifications in AutoSys?
- QWhat does term_run_time do and why is it important?
- QIf a job has n_retrys: 3 and fails every time, how many times does it actually run?
Frequently Asked Questions
What is date_conditions in AutoSys?
date_conditions controls whether time-based scheduling (start_times, days_of_week, run_calendar) is active for a job. Set to 1 to enable time-based scheduling; set to 0 to disable it. If date_conditions is 0, the job only runs when triggered by a condition (another job's success/failure) or manually.
How does n_retrys work in AutoSys?
n_retrys specifies how many times AutoSys automatically retries a failed job before declaring it a final FAILURE. If n_retrys is 3 and the job fails, AutoSys retries 3 times for a total of 4 attempts. After all retries are exhausted, the job moves to FAILURE status.
What happens if term_run_time is not set?
Without term_run_time, a job that hangs or runs indefinitely will continue forever. This can block all downstream jobs waiting on it. Always set a reasonable term_run_time to ensure hung jobs are terminated automatically.
What is the box_terminator attribute in AutoSys?
box_terminator: 1 marks a job as the 'kill switch' for its parent box. If this job fails, the entire box (and all remaining jobs in it) is terminated immediately, rather than waiting for other jobs to complete or fail.
How do I send email notifications from AutoSys?
Set alarm_if_fail: 1 and configure notification attributes: set notification: mail and notification_emailaddress: your-team@company.com. You can also customise the notification message with the notification_msg attribute.
Developer and founder of TheCodeForge. I built this site because I was tired of tutorials that explain what to type without explaining why it works. Every article here is written to make concepts actually click.