JIL Introduction — AutoSys Job Information Language Explained
- JIL (Job Information Language) is the scripting language for defining and managing all AutoSys objects — jobs, machines, calendars, and more
- The two ways to submit JIL are interactive mode (jil prompt) and script mode (jil < file.jil) — always use script mode in production
- delete_box removes a box AND all its child jobs; delete_job on a box removes only the box and leaves child jobs as standalone
- JIL (Job Information Language) is the declarative language for defining, modifying, and deleting AutoSys jobs
- Subcommands: insert_job, update_job, delete_job, delete_box, and more
- Attributes: job_type, command, machine, condition, start_times, etc.
- Script mode (jil < file.jil) is production-grade; interactive mode is for testing only
- Performance insight: JIL processing is near-instantaneous — bottleneck is network latency to the Event Server
- Production insight: One wrong delete_box command can wipe out an entire job chain with no undo
- Biggest mistake: Assuming JIL is case-insensitive for job names — they ARE case-sensitive
Quick JIL Debug Cheat Sheet
Syntax error during import
jil -syntax_check < /path/to/file.jilhead -n [line_number] /path/to/file.jil | tail -5Job not found after update
autorep -J jobname -qCheck case mismatch: job names are case-sensitiveAttributes not taking effect
autorep -J jobname -q | grep ^attribute_nameCompare the current value with the intended valueBox job deletion fails because it's not empty
autorep -J boxname% -qDecide whether to move or delete child jobs firstProduction Incident
autorep -q output. The engineer had, fortunately, run autorep -J nightly_reporting% -q > backup.jil before starting maintenance. Re-imported jil < backup.jil to restore all jobs and the box. No data was permanently lost, but the batch run was delayed by 45 minutes.autorep -q before any delete operation.Use delete_job instead of delete_box when you intend to remove only the box container.Implement a manual confirmation step in automation scripts before delete_box runs.Document the destructive nature of delete_box in your team's runbook.Production Debug GuideCommon errors when running `jil < file.jil` and how to fix them
jil -syntax_check < file.jil to pin exact line and error message.autorep -J jobname -q to verify existence.autorep -M machinename. Insert machine definition first if missing.autorep -J jobname to see status and next scheduled time.If you want to define, modify, or delete jobs in AutoSys, you use JIL — Job Information Language. It's not a general-purpose programming language, it's a declarative configuration language specifically designed for describing AutoSys jobs.
JIL is the foundation of everything in AutoSys. Whether you use the Web UI or the command line, everything ultimately becomes JIL under the hood. Learning to write JIL directly is faster, more powerful, and version-controllable. Every serious AutoSys professional works in JIL.
How to run JIL — two methods
There are two ways to submit JIL to AutoSys:
Interactive mode: Type jil at the command line to open the JIL prompt, then enter your definitions line by line, then type exit. Good for quick edits or testing.
Script mode: Write your JIL in a text file (by convention with a .jil extension), then redirect it into the jil command. This is how all production job definitions should be managed — text files that can be stored in version control.
# Method 1: Interactive mode jil # JIL> insert_job: my_test_job # JIL> job_type: CMD # JIL> command: echo hello # JIL> machine: server01 # JIL> owner: batchuser # JIL> exit # Method 2: Script file (recommended for production) jil < /opt/jil_scripts/my_jobs.jil # Method 3: Script with specific AutoSys instance jil -S ACE < /opt/jil_scripts/my_jobs.jil # Syntax check without actually loading (dry run) jil -syntax_check < /opt/jil_scripts/my_jobs.jil
/* AutoSys/JIL: 1 job(s) processed, 0 error(s) */
JIL syntax rules
JIL follows strict but simple syntax rules:
- Every job definition begins with a subcommand (
insert_job,update_job, etc.) followed by a colon and the job name - After the subcommand line, attribute statements follow — one per line (or multiple separated by spaces)
- The next subcommand begins a new job definition
- Comments start with
/ ... / - Attribute values containing spaces must be enclosed in double quotes
- JIL is case-insensitive for keywords but case-sensitive for job names and machine names
/* This is a JIL comment — ignored by the processor */ /* ── Job 1: simple command job ── */ insert_job: extract_sales_data /* subcommand: job name */ job_type: CMD /* attribute: job type */ command: "/opt/scripts/extract.sh -d 2026-03-19" /* space in value needs quotes */ machine: etl-server-01 owner: batchuser date_conditions: 1 days_of_week: all start_times: "01:00" std_out_file: /logs/autosys/extract_sales_data.out std_err_file: /logs/autosys/extract_sales_data.err alarm_if_fail: 1 description: "Extracts previous day sales data from OLTP to staging" /* ── Job 2: depends on Job 1 ── */ insert_job: transform_sales_data job_type: CMD command: /opt/scripts/transform.sh machine: etl-server-01 owner: batchuser condition: success(extract_sales_data) /* starts only when Job 1 succeeds */ alarm_if_fail: 1
/* AutoSys/JIL: Successfully inserted job: transform_sales_data */
/* AutoSys/JIL: 2 job(s) processed, 0 error(s) */
- insert_job: creates a blank form
- update_job: edits an existing form's fields
- delete_job: shreds the form
- delete_box: shreds the folder and all forms inside
- override_job: sticks a Post-it note on the form for the next run only
JIL subcommands reference
JIL subcommands tell the processor what action to take. The most commonly used ones are:
insert_job— creates a new job definitionupdate_job— modifies an existing job definition (only changes specified attributes)delete_job— removes a job from the Event Serverdelete_box— removes a box job AND all jobs inside itoverride_job— creates a one-time override for a specific job runinsert_machine— registers a new agent machineupdate_machine— modifies a machine definitiondelete_machine— removes a machine definition
For most day-to-day work, you'll primarily use insert_job, update_job, and delete_job.
/* Update an existing job — only changed attributes needed */ update_job: extract_sales_data start_times: "00:30" /* moved from 01:00 to 00:30 */ /* Delete a single job */ delete_job: old_legacy_report /* Delete a box AND all its child jobs */ delete_box: legacy_eod_box /* Register a new machine/agent */ insert_machine: new-server-02 max_load: 100 factor: 1.00
/* AutoSys/JIL: Successfully deleted job: old_legacy_report */
/* AutoSys/JIL: Successfully deleted box: legacy_eod_box (3 inner jobs deleted) */
/* AutoSys/JIL: Successfully inserted machine: new-server-02 */
Viewing the JIL definition of an existing job
One of the most useful things you can do in AutoSys is dump the JIL definition of any existing job. This is how you see exactly what attributes are set, copy a job as a template, or audit what's changed.
# Dump the JIL definition of a specific job autorep -J extract_sales_data -q # Dump all jobs in a box autorep -J eod_processing_box% -q # Dump all jobs matching a pattern and save to file autorep -J etl_% -q > /tmp/etl_jobs_backup.jil # This is also how you back up job definitions before making changes
insert_job: extract_sales_data job_type: c
command: /opt/scripts/extract.sh -d 2026-03-19
machine: etl-server-01
owner: batchuser
date_conditions: 1
days_of_week: all
start_times: "01:00"
alarm_if_fail: 1
JIL best practices for production
Treat JIL files as code: use version control, code reviews, and CI checks.
- Store each job in its own .jil file, or logically grouped files per box.
- Use descriptive job names that include the system and purpose (e.g., etl_sales_extract).
- Always set
alarm_if_fail: 1so failures trigger alerts. - Set
max_run_alarmto detect hung jobs (in minutes). - Use termination methods like
kill_jobfor graceful shutdown. - Document dependencies using comments in JIL.
- Avoid hardcoding paths; use global variables ($VAR) when possible.
- Validate syntax before every import with
jil -syntax_check < file.jil.
/* ────────────────────────────────────────────── etl_sales_daily.jil — Production job definition Version 2.1 | Last modified: 2026-04-20 ────────────────────────────────────────────── */ insert_job: etl_sales_daily job_type: CMD command: "/opt/scripts/etl/run_sales_pipeline.sh -env prod" machine: batch-prod-01 owner: batchadmin date_conditions: 1 days_of_week: mon,tue,wed,thu,fri start_times: "03:00" max_run_alarm: 120 alarm_if_fail: 1 std_out_file: /logs/autosys/etl_sales_daily.out std_err_file: /logs/autosys/etl_sales_daily.err condition: success(etl_refresh_dimensions) description: "ETL pipeline for daily sales data — exports to staging for analytics"
/* AutoSys/JIL: 1 job(s) processed, 0 error(s) */
| JIL Subcommand | What it does | Affects child jobs? |
|---|---|---|
| insert_job | Creates a new job definition | N/A |
| update_job | Modifies an existing job (partial update) | No |
| delete_job | Removes a job definition | No — box becomes empty |
| delete_box | Removes a box AND all its children | Yes — all inner jobs deleted |
| override_job | One-time change for next run only | No |
| insert_machine | Registers a new agent machine | N/A |
🎯 Key Takeaways
- JIL (Job Information Language) is the scripting language for defining and managing all AutoSys objects — jobs, machines, calendars, and more
- The two ways to submit JIL are interactive mode (jil prompt) and script mode (jil < file.jil) — always use script mode in production
- delete_box removes a box AND all its child jobs; delete_job on a box removes only the box and leaves child jobs as standalone
- Use
autorep -J jobname -qto dump the JIL definition of any existing job — essential for backups and templates - Always run
jil -syntax_checkbefore importing to production — it catches 95% of syntax errors - Back up job definitions with
autorep -qbefore any bulk change; restore them with the same syntax
⚠ Common Mistakes to Avoid
Interview Questions on This Topic
- QWhat is JIL in AutoSys and how is it used?JuniorReveal
- QWhat is the difference between delete_job and delete_box in JIL?Mid-levelReveal
- QWhat is the difference between insert_job and update_job?JuniorReveal
- QHow do you view the JIL definition of an existing AutoSys job?JuniorReveal
- QHow do you import a JIL script file into AutoSys?JuniorReveal
- QWhat should you do if you accidentally run delete_box on the wrong box?Mid-levelReveal
Frequently Asked Questions
What is JIL in AutoSys?
JIL stands for Job Information Language. It is the scripting language used to define, modify, and delete jobs and other objects in AutoSys. You write JIL scripts as plain text files and submit them to AutoSys using the jil command.
How do I run a JIL script in AutoSys?
Redirect your JIL file into the jil command: jil < myjobs.jil. For a specific AutoSys instance, use jil -S INSTANCE_NAME < myjobs.jil. For a dry-run syntax check, use jil -syntax_check < myjobs.jil.
What is the difference between insert_job and update_job in JIL?
insert_job creates a brand new job definition. update_job modifies an existing job — you only need to specify the attributes you want to change; all other attributes remain as they were.
How do I see the JIL definition of an existing AutoSys job?
Use autorep -J jobname -q. The -q flag outputs the job definition in JIL format, which you can redirect to a file to back up or use as a template.
Is JIL case-sensitive?
JIL keywords (like insert_job, job_type, machine) are case-insensitive. However, job names and machine names are case-sensitive. A job named 'Daily_Report' and 'daily_report' are treated as two different jobs.
Is there a way to undo a delete_box?
No, there is no undo command in JIL. The only recovery is to re-import job definitions from a prior backup. That's why backing up with autorep -q before any delete operation is critical for production environments.
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.