AutoSys JIL delete_box — Irreversible Pipeline Delete
The 'nightly_reporting' box vanished after delete_box.
- 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
JIL is like filling out a form for each job you want AutoSys to manage. The form has specific fields: what's the job's name, what command should it run, which machine should run it, when should it run, and what should happen if it fails. JIL is the language that fills out that form.
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.
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
- 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.
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.
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.
Accidental deletion of entire batch pipeline using delete_box
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.- Always back up job definitions with
autorep -qbefore 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.
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.Key takeaways
autorep -J jobname -q to dump the JIL definition of any existing jobjil -syntax_check before importing to productionautorep -q before any bulk change; restore them with the same syntaxCommon mistakes to avoid
5 patternsUsing delete_box instead of delete_job to remove a box
delete_job: boxname instead of delete_box. This removes only the box container; child jobs become standalone and can be reassigned or deleted individually.Not quoting attribute values that contain spaces
command: /opt/scripts/run report.sh becomes command: /opt/scripts/run with report.sh passed as an extra argument, causing the job to fail with 'command not found'.command: "/opt/scripts/run report.sh". Same for other attributes like description, start_times, and std_out_file paths.Using interactive JIL mode for production changes
jil < file.jil. Store files in Git. Use jil -syntax_check to validate before importing.Not backing up job definitions before making bulk changes
autorep -J jobname -q > backup_$(date +%Y%m%d).jil. For boxes, use autorep -J boxname% -q > backup_box.jil to capture all children.Assuming job names are case-insensitive
autorep -J exactCaseName -q.Interview Questions on This Topic
What is JIL in AutoSys and how is it used?
jil command. For example, jil < myjobs.jil imports the definitions. JIL can also be used interactively by typing jil at the command line, opening a prompt where statements are entered line by line. The language consists of subcommands (insert_job, update_job, etc.) and attributes (job_type, command, machine, etc.).Frequently Asked Questions
That's AutoSys. Mark it forged?
3 min read · try the examples if you haven't