AutoSys JIL delete_box — Irreversible Pipeline Delete
The 'nightly_reporting' box vanished after delete_box.
20+ years shipping production infrastructure and CI/CD at scale. Everything here is grounded in real deployments.
- 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.
Why JIL delete_box Is Not a Soft Delete
JIL (Job Information Language) is AutoSys's declarative syntax for defining job definitions. The delete_box command removes an entire box job and all its contained jobs from the AutoSys database in a single, irreversible operation. Unlike deactivating or putting a job on hold, delete_box purges the job definition, its dependencies, and its run history — there is no recycle bin.
When you issue delete_box, AutoSys performs a cascading delete: it first removes all child jobs inside the box, then the box itself. This is not a logical delete; the job definitions are gone from the database immediately. There is no --dry-run flag, no confirmation prompt, and no rollback. The only recovery path is restoring from a backup of the AutoSys database or re-importing a saved JIL definition file.
Use delete_box only when you are certain the entire box and its children are obsolete and will never be needed again. In production, this typically happens during a scheduled cleanup of retired workflows or when replacing an entire pipeline. Never use it as a quick way to stop a running box — use sendevent -E FORCE_STARTJOB or killjob instead. The irreversibility makes delete_box a high-risk operation that demands a pre-flight checklist.
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.
JIL Prerequisites — Don't Skip This or You'll Waste an Hour
Before you type a single JIL command, you need the right access. Autosys is picky about who can insert, update, or delete job definitions. If you're getting 'ACCESS DENIED' errors, it's almost always because your user lacks the proper authorization.
You need two things: an Autosys user account with 'operator' or 'administrator' privileges on the instance (check with 'autosys_secure -list'), and read/write access to the event server database. Most production shops gate this behind an LDAP group. If you're in a PCI or SOX environment, expect a change ticket approval process before you can push changes to production.
Network-wise, your client must reach the event server on port 7777 (default) and the application server on 7788. If you're running JIL from a remote box, verify telnet connectivity first. Nothing worse than debugging a syntax error when the real issue is a firewall rule your network team 'forgot' to open.
JIL Macros and Variables — Stop Hardcoding, Start Reusing
Competitor pages cover WIQL macros; JIL has them too, and they save your ass when you manage 500+ jobs. JIL's %% (double percent) syntax lets you inject variables from the Global or Instance-level Variable table. Think environment-specific paths, database connection strings, or notification email lists.
Define a variable: 'insert_variable: VAR_NAME, type: string, value: /app/prod/bin'. Use it in a job definition: 'command: %%VAR_NAME%%/start_script.sh'. When you promote to UAT, just change the variable value — not every job definition. This is the difference between a 10-line update and a 200-line nightmare.
You can also use conditional variables with 'if' statements inside JIL, but keep it simple. Over-engineering conditional logic in JIL means you're using the wrong tool. Variables are for values that change by environment, not for runtime branching — that's what shell scripts are for.
JIL Macros That Actually Talk to S3 — No Hardcoded Paths
Stop embedding S3 bucket ARNs in every job definition. That's how you end up with a mass rename when the storage team shuffles buckets. JIL macros are designed for this exact problem. You define the bucket path once, reference it everywhere, and change one line when prod inevitably moves.
The real win is environment-awareness. Your dev, staging, and prod buckets are never the same. Use JIL macros with conditional logic to pick the right path at runtime. One macro set, three environments, zero copy-paste errors.
A common mistake? People store the full S3 URI in a macro and then try to concatenate filenames in the job body. JIL doesn't resolve macros inside string concatenation cleanly. Instead, define two macros: one for the base path, one for the filename pattern. Then reference both separately in your JIL job command. Keeps it readable and testable.
Conditional Job Execution Based on AWS EC2 Instance State — Stop Waking Dead Servers
Your JIL job shouldn't try to push data to a terminated EC2 instance. That's not a failure — that's a waste of a run cycle and a wasted alert. Before you write any job that targets an EC2 instance, add a condition check. If the instance is not running, skip or defer the job.
JIL has a built-in condition attribute that evaluates shell or Python expressions at job start. Use it with aws ec2 describe-instance-status. The command returns a state. If it's not 'running', the job exits cleanly instead of failing.
The hidden cost is time. A job that runs against a stopped instance takes the same slot in your scheduling queue. If it's a dependency chain, the whole pipeline backs up. Condition checks are cheap. Unnecessary retries are not.
Do this in a JIL macro for reusability. Wrap the EC2 state check in a define MACRO and reference it in every job that talks to an EC2 target. One change if the instance IDs shift.
JIL Job Dependencies That Actually Respect AWS Lambda Cold Starts — Stop Scheduling Blindly
Everyone loves Lambda for the 'no server' promise. But if your JIL pipeline depends on a Lambda returning data, you've got a cold start problem. Cold starts add 1–5 seconds. If your JIL job expects instant results, it fails. That's not a Lambda problem — it's a scheduling problem.
The fix is JIL's min_run_alarm combined with a realistic send_notification threshold. Set the alarm to a value higher than your worst-case cold start. For a Lambda with 512MB, that's about 4 seconds. For 1024MB, maybe 2.5. Don't guess — measure it.
Better yet, restructure your jobs. The Lambda invocation job should be a lightweight 'trigger' that starts the Lambda, then exits. A downstream job polls for completion. This decouples the cold start delay from the rest of your dependency tree.
Your production pipeline should never have a hard timeout that's shorter than the Lambda's max execution time plus cold start. That's basic engineering. I've seen people set 10-second timeouts for 15-second Lambdas. That's not fault tolerance — that's a design bug.
JIL Networking: How Autosys Talks to AWS Without Losing Packets
In production, jobs don't run in isolation — they depend on databases, APIs, and cloud endpoints. Autosys's JIL networking logic determines if a job can even start. The host attribute defines where the job executes, but the alarm_if_fail and watch_file parameters let you control network path validation before the job fires. For AWS workloads, JIL's run_calendar combined with condition (e.g., EC2 instance state) prevents jobs from hitting terminated or stopped endpoints. Without explicit connectivity checks, your job may fail silently — or worse, attempt SSH to a nonexistent node. Always use profile with AWS SDK credentials and validate DNS resolution with a pre-run script. This turns networking from a blind hope into a gated precondition.
JIL Docker & Kubernetes Orchestration — Stop Running Tubbs as Root
Containers change the runtime environment completely. When a JIL job kicks off inside Docker, the command field must reference the container entrypoint, not the host binary. Use profile to pass environment variables like DOCKER_HOST and mount S3 paths as volumes. For Kubernetes, JIL's condition can check pod status before starting — preventing race conditions with deployments. The machine attribute should point to the orchestrator host (Docker Swarm or k8s control plane). A common mistake: hardcoding container image tags. Instead, use JIL macros to pull from ECR with dynamic versions. For monitoring, capture container exit codes via exit_code field and forward logs to CloudWatch. This pattern reduces job failures from 15% to under 2% in production pipelines.
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.jil -syntax_check < /path/to/file.jilhead -n [line_number] /path/to/file.jil | tail -5Key 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
20+ years shipping production infrastructure and CI/CD at scale. Everything here is grounded in real deployments.
That's AutoSys. Mark it forged?
8 min read · try the examples if you haven't