Mid-level 8 min · March 19, 2026
JIL Introduction and Syntax

AutoSys JIL delete_box — Irreversible Pipeline Delete

The 'nightly_reporting' box vanished after delete_box.

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
May 23, 2026
last updated
1,554
articles · all by Naren
 ● Production Incident 🔎 Debug Guide ⚙ Triage Commands
Quick Answer
  • 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
✦ Definition~90s read
What is JIL Introduction and Syntax?

AutoSys JIL (Job Information Language) is the declarative scripting language used to define, modify, and delete jobs in CA Workload Automation (AutoSys). Unlike GUI-based job management, JIL gives you a repeatable, version-controllable way to manage thousands of batch jobs across distributed systems.

JIL is like filling out a form for each job you want AutoSys to manage.

The delete_box subcommand is particularly dangerous because it performs an irreversible cascade delete of a job box and all its contents — there is no soft delete, no recycle bin, and no rollback. Once you issue delete_box, every job, dependency, and condition inside that box is permanently removed from the AutoSys database.

This is by design: AutoSys assumes you know what you're doing, and it prioritizes operational speed over safety nets. In production, you should always dump the JIL definition of the box first (jil < box.jil) to preserve a backup, and consider using sendevent -E FORCE_STARTJOB or sendevent -E JOB_ON_ICE to disable jobs instead of deleting them outright.

The JIL syntax itself is whitespace-sensitive (tabs vs. spaces matter), case-insensitive for keywords but case-sensitive for job names, and uses / ... / for comments. You interact with JIL via two methods: inline commands (jil -i 'insert_job: myjob job_type: c') or batch files (jil < myjobs.jil).

For production, always validate your JIL with autosys_secure -p before applying, and never run delete_box without first confirming the box is empty or that you have a full backup of its definitions.

Plain-English First

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.

No Undo Button
delete_box does not move jobs to a trash folder — it issues a DELETE FROM database statement. If you need to preserve history, export the JIL first with autosys_export.
Production Insight
A team accidentally deleted a critical batch pipeline when a junior engineer ran delete_box on a box they thought was a test copy — the box name differed by one character.
The symptom: the next day's batch run failed with 'job not found' errors for all 47 jobs inside the deleted box, triggering a P1 incident.
Rule of thumb: always export the box JIL to a version-controlled file before deleting, and require a second pair of eyes on the exact box name.
Key Takeaway
delete_box is irreversible — no recycle bin, no undo, no soft delete.
Always export JIL definitions before deletion; treat delete_box like a database DROP TABLE.
Use deactivation or hold for temporary removal; delete_box is for permanent pipeline retirement only.
JIL Submit Flow JIL Submit Flow. From .jil file to Event Server · Write JIL file · job attributes in plain text · pipe file into jil processor · JIL processor parses · validates syntax and attributes THECODEFORGE.IOJIL Submit FlowFrom .jil file to Event Server Write JIL filejob attributes in plain text jil < myjobs.jilpipe file into jil processor JIL processor parsesvalidates syntax and attributes Stored in Event Serverjob definition persisted to DB Event Processor picks upjob is now schedulableTHECODEFORGE.IO
thecodeforge.io
JIL Submit Flow
Jil Introduction Syntax

How to run JIL — two methods

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_usage.shBASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 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
Output
/* AutoSys/JIL: Successfully inserted job: my_test_job */
/* AutoSys/JIL: 1 job(s) processed, 0 error(s) */
Always use script files for production job definitions
Interactive mode is convenient for quick tests but terrible for auditing. If you define a production job interactively and something goes wrong, there's no record of exactly what you typed. Use text files stored in Git — every change is tracked, every rollback is possible.
Production Insight
Using interactive mode for production changes creates an audit gap — no record of what was typed.
Always script-mode JIL files stored in version control.
The first thing a senior engineer does after a job failure is check the JIL file, not the WCC screen.
Key Takeaway
Script mode is the only production-safe way to manage JIL.
Interactive mode is for prototyping only.
Rule: if it's not in a .jil file, it didn't happen.
Which method to use?
IfQuick test or one-off command
UseInteractive mode (jil prompt)
IfPermanent job definition or change
UseScript mode (jil < file.jil)
IfBulk import of multiple jobs
UseScript mode with a single .jil file
IfSyntax validation before deployment
UseScript mode with -syntax_check flag

JIL syntax rules

  1. Every job definition begins with a subcommand (insert_job, update_job, etc.) followed by a colon and the job name
  2. After the subcommand line, attribute statements follow — one per line (or multiple separated by spaces)
  3. The next subcommand begins a new job definition
  4. Comments start with / ... /
  5. Attribute values containing spaces must be enclosed in double quotes
  6. JIL is case-insensitive for keywords but case-sensitive for job names and machine names
jil_syntax_rules.jilBASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* 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
Output
/* AutoSys/JIL: Successfully inserted job: extract_sales_data */
/* AutoSys/JIL: Successfully inserted job: transform_sales_data */
/* AutoSys/JIL: 2 job(s) processed, 0 error(s) */
Think of JIL as filling out a form
  • 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
Production Insight
Forgetting quotes around commands with spaces causes silent failures — the command gets truncated.
Case mismatch in job names creates duplicate definitions that are invisible until one completes.
Rule: always quote every value that could contain a space.
Key Takeaway
JIL syntax is simple but unforgiving.
Quotes and case sensitivity are the top two gotchas.
Rule: quote any value with spaces; job names are case-sensitive.

JIL subcommands reference

JIL subcommands tell the processor what action to take. The most commonly used ones are:

  • insert_job — creates a new job definition
  • update_job — modifies an existing job definition (only changes specified attributes)
  • delete_job — removes a job from the Event Server
  • delete_box — removes a box job AND all jobs inside it
  • override_job — creates a one-time override for a specific job run
  • insert_machine — registers a new agent machine
  • update_machine — modifies a machine definition
  • delete_machine — removes a machine definition

For most day-to-day work, you'll primarily use insert_job, update_job, and delete_job.

jil_subcommands.jilBASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* 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
Output
/* AutoSys/JIL: Successfully updated job: extract_sales_data */
/* 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 */
delete_box deletes child jobs too — be careful
When you use delete_box, all jobs inside the box are deleted from the Event Server along with the box itself. If you want to remove only the box but keep the child jobs as standalone jobs, use delete_job on the box name instead.
Production Insight
delete_box is the most dangerous command in JIL — it silently deletes all child jobs with no confirmation.
One mistyped box name can wipe out months of job definitions.
Rule: always backup with autorep -q before running delete_box.
Key Takeaway
Use delete_box only when you intend to remove the entire job tree.
For box removal only, use delete_job.
Rule: when in doubt, backup first.
Which subcommand should you use?
IfCreating a new job
Useinsert_job
IfModifying an existing job's attribute
Useupdate_job
IfRemoving a single job permanently
Usedelete_job
IfRemoving a box and all its children
Usedelete_box
IfRemoving only the box, keeping children
Usedelete_job on box name
IfTemporary one-time change
Useoverride_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.

view_jil.shBASH
1
2
3
4
5
6
7
8
9
10
# 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
Output
/* ---- extract_sales_data ---- */
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
Production Insight
autorep -q is the single most important debugging command.
When a job fails unexpectedly, dump its JIL to see if someone changed an attribute without telling you.
Rule: always run autorep -q before modifying a job.
Key Takeaway
Viewing JIL definitions is the first step in any job audit.
Always back up before changes.
Rule: autorep -q is your safety net.

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: 1 so failures trigger alerts.
  • Set max_run_alarm to detect hung jobs (in minutes).
  • Use termination methods like kill_job for 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.
production_job_example.jilBASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* ──────────────────────────────────────────────
   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"
Output
/* AutoSys/JIL: Successfully inserted job: etl_sales_daily */
/* AutoSys/JIL: 1 job(s) processed, 0 error(s) */
Treat JIL like infrastructure code
Review every JIL change in a pull request, run a syntax check in CI, and store all .jil files in the same repo as your application code. This discipline reduces on-call incidents by an order of magnitude.
Production Insight
Unmonitored jobs silently queue up and cause backpressure.
Missing alarm_if_fail means a job failure goes unnoticed until a downstream job fails.
Rule: every production job must have alarm_if_fail: 1 and a reasonable max_run_alarm.
Key Takeaway
Production JIL needs the same rigor as application code.
Alarms, version control, and clear naming prevent most on-call fires.
Rule: write JIL like it's going to fail — because it will.
Setting alarms based on criticality
IfJob is business-critical (revenue, compliance)
Usealarm_if_fail: 1, max_run_alarm: 30
IfJob is important but not urgent (reports)
Usealarm_if_fail: 1, max_run_alarm: 60
IfJob is informational (log archival)
Usealarm_if_fail: 0, max_run_alarm: 0

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.

PrerequisiteCheck.ymlYAML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// io.thecodeforge — devops tutorial

// Verify user permissions
autosys_secure -list
# Output should show your user and role

// Test network connectivity
$ telnet autosys-eventserver 7777
Trying 10.20.30.40...
Connected to autosys-eventserver.
Escape character is '^]'.

// Confirm event server status
$ autoflags -s
EVENT_SERVER: RUNNING
Output
autosys_secure -list: user=jdoe role=operator
telnet: Connected to 10.20.30.40:7777
autoflags: EVENT_SERVER: RUNNING
Production Trap: LDAP Timeouts
If your JIL update hangs for 30+ seconds before failing, it's likely an LDAP authentication timeout. Cache your credentials or use a service account with persistent sessions.
Key Takeaway
Always check network connectivity and user permissions first — JIL errors are rarely syntax problems.

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.

VariableExample.ymlYAML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// io.thecodeforge — devops tutorial

// Define global variable (run once per environment)
insert_variable: APP_HOME
  type: string
  value: /data/app/prod

// Job using that variable
insert_job: daily_cleanup
  job_type: cmd
  command: %%APP_HOME%%/bin/cleanup.sh
  machine: prod-app-01
  owner: jdoe@company.com
  days_of_week: mo,tu,we,th,fr
  start_times: "03:00"
Output
Job 'daily_cleanup' defined.
Variable 'APP_HOME' with value '/data/app/prod' inserted.
Senior Shortcut: Variable Scoping
Use instance-level variables (insert_variable with instance attribute) for multi-AZ deployments. Global variables stay across all jobs in an instance; instance variables override per-AZ.
Key Takeaway
Variables turn a fragile pile of hardcoded paths into a maintainable configuration. Use them or regret it.

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.

S3_Backup_JIL.ymlYAML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// io.thecodeforge — devops tutorial

// Macro definitions — single source of truth
// Change these when storage layout changes (and it will)
define MACRO S3_BASE = 's3://autoparts-prod-data/warehouse/'
define MACRO JOB_DATE = '$(date +%Y%m%d)'

// The job — no hardcoded paths
insert_job: nightly_inventory_backup
job_type: cmd
command: 'aws s3 sync /data/inventory $(S3_BASE)/inventory/$(JOB_DATE)/'
machine: prod-worker-01
description: 'Backup inventory to S3 — uses only macros'

// Break the macro into parts if you need filename filtering
// This avoids JIL's string concatenation limitations
Output
Job 'nightly_inventory_backup' defined. Macro S3_BASE resolves at runtime.
Production Trap:
Never hardcode 's3://my-bucket/' inside command parameters. Jobs break silently when the bucket lifecycle policy changes. Always use a macro with a descriptive name.
Key Takeaway
One macro per resource type. Three environments. Zero WTF moments.

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.

EC2_Conditional_JIL.ymlYAML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// io.thecodeforge — devops tutorial

// Reusable macro for EC2 state validation
define MACRO EC2_RUNNING = '
  aws ec2 describe-instance-status --instance-ids i-0a1b2c3d4e5f \
    --query "InstanceStatuses[0].InstanceState.Name" --output text
' | grep -q 'running'

// Job only runs if the macro returns true
insert_job: push_to_ec2_worker
job_type: cmd
command: 'rsync -avz /data/out/ ubuntu@i-0a1b2c3d4e5f:/var/ingest/'
condition: '$(EC2_RUNNING)'
machine: prod-controller

// Falls here silently if the instance is gone
Output
Condition check passed: EC2 instance i-0a1b2c3d4e5f is running. Job queued.
Senior Shortcut:
Turn off email alerts for 'Job skipped due to condition' — they're noise. Only alert on actual failures. Log the condition result to a local file for auditing.
Key Takeaway
A condition check costs you 200ms. A failed run against a dead instance costs 20 minutes.

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.

Lambda_JIL_Dependency.ymlYAML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// io.thecodeforge — devops tutorial

// Step 1: Trigger Lambda, no wait
insert_job: lambda_trigger
job_type: cmd
command: 'aws lambda invoke --function-name process-orders /dev/null'
machine: prod-controller

// Step 2: Wait for result with realistic cold start
insert_job: poll_lambda_result
job_type: cmd
command: 'aws s3 cp s3://orders-prod/status/$(date +%Y%m%d).json -'
condition: 'sleep 5 && true' // accounts for 4s cold start + 1s buffer
min_run_alarm: 8  // seconds — gives 5s for cold start + execution
depends_on: lambda_trigger

// Step 3: Process only if Lambda finished
insert_job: process_orders
job_type: cmd
command: 'python3 /scripts/process_orders.py'
condition: 'cat $(LAST_JOB_OUTPUT) | jq -e ".status == \"complete\""'
depends_on: poll_lambda_result
Output
Lambda cold start + execution: 6.2s. Polling succeeded. Processing job queued.
Senior Shortcut:
Log Lambda cold start times per memory size to a JIL variable. Use that value dynamically in min_run_alarm. No more hardcoded guesses.
Key Takeaway
Lambda cold starts are physics. Your JIL schedule is engineering. Adjust the data.

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_network_check.ymlYAML
1
2
3
4
5
6
7
8
9
// io.thecodeforge — devops tutorial
// JIL networking precondition: validate EC2 reachability
insert_job: validate_ec2_endpoint
job_type: c
command: 'aws ec2 describe-instance-status --instance-ids i-abc123'
machine: prod_host
alarm_if_fail: 1
watch_file: /tmp/network_ok
condition: s(ec2_up_check, status == "ok")
Output
job 'validate_ec2_endpoint' successfully inserted.
Production Trap:
Never rely on autosys 'ping' as a health check — EC2 instances may respond to ICMP while failing application ports. Use 'condition' with a real status check.
Key Takeaway
Always gate your JIL job on a networking precondition — test DNS, port, or AWS API before the main command runs.

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.

jil_k8s_job.ymlYAML
1
2
3
4
5
6
7
8
9
10
// io.thecodeforge — devops tutorial
// JIL job that runs inside Kubernetes pod
insert_job: run_k8s_batch
job_type: c
command: 'kubectl run batch-job --image=myapp:${APP_VERSION} --restart=Never'
machine: k8s_master
profile: devops_env
max_run_alarm: 30
alarm_if_fail: 1
condition: s(pod_check, status == "Running")
Output
job 'run_k8s_batch' successfully inserted.
Production Trap:
Never hardcode container image tags — use JIL macros that fetch the latest ECR digest. Otherwise, stale images cause silent failures.
Key Takeaway
Container orchestration with JIL requires dynamic image tags, pre-flight pod checks, and exit code forwarding to avoid blind scheduling.
● Production incidentPOST-MORTEMseverity: high

Accidental deletion of entire batch pipeline using delete_box

Symptom
All jobs in the 'nightly_reporting' box disappeared after a scheduled maintenance window. Downstream jobs began failing with 'waiting for predecessor' status, and the batch team was paged at 3 AM.
Assumption
The engineer assumed that delete_box removes only the container box, leaving child jobs untouched. This is the intuitive expectation for anyone coming from databases or file systems where deleting a folder asks for confirmation about children.
Root cause
delete_box is a recursive command that removes the box AND all jobs within it from the Event Server. There is no 'Are you sure?' prompt — the deletion is immediate and irreversible without a backup.
Fix
Restored from a backup taken earlier in the day using 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.
Key lesson
  • Always back up job definitions with 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 them5 entries
Symptom · 01
JIL syntax error: unexpected attribute
Fix
Check for missing colon after subcommand (e.g., insert_job: jobname). Run jil -syntax_check < file.jil to pin exact line and error message.
Symptom · 02
Job already exists
Fix
Use update_job instead of insert_job. Or delete the existing job first. Use autorep -J jobname -q to verify existence.
Symptom · 03
Machine not found
Fix
Verify machine name is registered via autorep -M machinename. Insert machine definition first if missing.
Symptom · 04
Invalid job type
Fix
Job type must be CMD, BOX, or FILE_WATCHER. Check for typos, e.g., 'commmand' instead of 'command'.
Symptom · 05
Job imported but never runs
Fix
Check date_conditions and start_times. Verify the job is not on hold. Use autorep -J jobname to see status and next scheduled time.
★ Quick JIL Debug Cheat SheetFast commands to diagnose and fix JIL issues without reading manuals.
Syntax error during import
Immediate action
Run dry-run syntax check
Commands
jil -syntax_check < /path/to/file.jil
head -n [line_number] /path/to/file.jil | tail -5
Fix now
Correct the syntax on the identified line, then re-run the import.
Job not found after update+
Immediate action
Verify job exists with autorep
Commands
autorep -J jobname -q
Check case mismatch: job names are case-sensitive
Fix now
Use the exact job name as shown in autorep output, with correct casing.
Attributes not taking effect+
Immediate action
Check if job was defined with same attribute earlier
Commands
autorep -J jobname -q | grep ^attribute_name
Compare the current value with the intended value
Fix now
Use update_job to override the attribute. Ensure no conflicting override_job exists from prior runs.
Box job deletion fails because it's not empty+
Immediate action
List contents of the box
Commands
autorep -J boxname% -q
Decide whether to move or delete child jobs first
Fix now
Use delete_job on boxname to remove box while keeping children, or move children out before delete_box.
JIL Subcommand Comparison
JIL SubcommandWhat it doesAffects child jobs?
insert_jobCreates a new job definitionN/A
update_jobModifies an existing job (partial update)No
delete_jobRemoves a job definitionNo — box becomes empty
delete_boxRemoves a box AND all its childrenYes — all inner jobs deleted
override_jobOne-time change for next run onlyNo
insert_machineRegisters a new agent machineN/A

Key takeaways

1
JIL (Job Information Language) is the scripting language for defining and managing all AutoSys objects
jobs, machines, calendars, and more
2
The two ways to submit JIL are interactive mode (jil prompt) and script mode (jil < file.jil)
always use script mode in production
3
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
4
Use autorep -J jobname -q to dump the JIL definition of any existing job
essential for backups and templates
5
Always run jil -syntax_check before importing to production
it catches 95% of syntax errors
6
Back up job definitions with autorep -q before any bulk change; restore them with the same syntax

Common mistakes to avoid

5 patterns
×

Using delete_box instead of delete_job to remove a box

Symptom
All child jobs disappear from the Event Server. Downstream dependent jobs fail with 'waiting for predecessor' or simply vanish from schedules.
Fix
Use 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

Symptom
JIL import succeeds but the command runs only the first token. For example, 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'.
Fix
Always enclose the entire command in double quotes: 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

Symptom
No audit trail of what was changed. When a job starts failing three months later, there is no way to trace back who typed what. Rollback is impossible.
Fix
Always write JIL changes in a script file (.jil) and import via jil < file.jil. Store files in Git. Use jil -syntax_check to validate before importing.
×

Not backing up job definitions before making bulk changes

Symptom
A bulk update or deletion goes wrong and the original definitions are lost. Manual reconstruction is error-prone and time-consuming.
Fix
Before any change, run 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

Symptom
Two jobs with names 'Daily_Report' and 'daily_report' exist. One runs at the correct time, the other runs unexpectedly or never triggers. Conditions referencing 'Daily_Report' might not match the job with different casing.
Fix
Standardize job naming conventions (e.g., all uppercase or all lowercase). Use consistent casing in JIL scripts and in job references in conditions. Always verify with autorep -J exactCaseName -q.
INTERVIEW PREP · PRACTICE MODE

Interview Questions on This Topic

Q01JUNIOR
What is JIL in AutoSys and how is it used?
Q02SENIOR
What is the difference between delete_job and delete_box in JIL?
Q03JUNIOR
What is the difference between insert_job and update_job?
Q04JUNIOR
How do you view the JIL definition of an existing AutoSys job?
Q05JUNIOR
How do you import a JIL script file into AutoSys?
Q06SENIOR
What should you do if you accidentally run delete_box on the wrong box?
Q01 of 06JUNIOR

What is JIL in AutoSys and how is it used?

ANSWER
JIL (Job Information Language) is the declarative language used to define, modify, and delete jobs and other AutoSys objects. It is used by writing JIL statements in a text file and submitting them via the 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.).
FAQ · 6 QUESTIONS

Frequently Asked Questions

01
What is JIL in AutoSys?
02
How do I run a JIL script in AutoSys?
03
What is the difference between insert_job and update_job in JIL?
04
How do I see the JIL definition of an existing AutoSys job?
05
Is JIL case-sensitive?
06
Is there a way to undo a delete_box?
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
May 23, 2026
last updated
1,554
articles · all by Naren
🔥

That's AutoSys. Mark it forged?

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

Previous
AutoSys vs Cron vs Control-M
6 / 30 · AutoSys
Next
JIL Job Types: CMD, BOX and File Watcher