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.
thecodeforge.io
Jil Introduction Syntax
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.
🔥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
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)
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
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
Version2.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"
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 7777Trying10.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 forEC2 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.
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.
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.
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.
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 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
⚙ Quick Reference
12 commands from this guide
File
Command / Code
Purpose
jil_usage.sh
jil
How to run JIL
jil_syntax_rules.jil
/* This is a JIL comment — ignored by the processor */
JIL syntax rules
jil_subcommands.jil
/* Update an existing job — only changed attributes needed */
Conditional Job Execution Based on AWS EC2 Instance State
Lambda_JIL_Dependency.yml
insert_job: lambda_trigger
JIL Job Dependencies That Actually Respect AWS Lambda Cold Starts
jil_network_check.yml
insert_job: validate_ec2_endpoint
JIL Networking
jil_k8s_job.yml
insert_job: run_k8s_batch
JIL Docker & Kubernetes Orchestration
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.).
Q02 of 06SENIOR
What is the difference between delete_job and delete_box in JIL?
ANSWER
delete_job removes a single job definition from the Event Server. If applied to a box job, it removes only the box container; all child jobs inside the box remain in the database as standalone jobs. delete_box removes the box AND recursively deletes every job inside it. This is a powerful and dangerous command because there is no confirmation prompt. Always use delete_job on a box if you want to preserve the child jobs, and back up definitions with autorep -q before using delete_box.
Q03 of 06JUNIOR
What is the difference between insert_job and update_job?
ANSWER
insert_job creates a new job definition. It requires all mandatory attributes (job_type, command, machine, owner). If the job already exists, the JIL processor returns an error. update_job modifies an existing job. You only need to specify the attributes you want to change; all other attributes remain unchanged. update_job is idempotent for the attributes you set. Use autorep -J jobname -q to see the current definition before updating.
Q04 of 06JUNIOR
How do you view the JIL definition of an existing AutoSys job?
ANSWER
Use the autorep command with the -q (query) flag: autorep -J jobname -q. This outputs the job definition in JIL format to stdout. You can redirect to a file to back up or edit: autorep -J jobname -q > job.jil. For a box, use a wildcard to get all children: autorep -J boxname% -q > box_backup.jil. The -q output is valid JIL and can be re-imported directly.
Q05 of 06JUNIOR
How do you import a JIL script file into AutoSys?
ANSWER
Import a JIL script by redirecting the file into the jil command: jil < /path/to/script.jil. For a specific AutoSys instance, use the -S flag: jil -S INSTANCE_NAME < script.jil. Before importing, validate the syntax with jil -syntax_check < script.jil to catch errors without risking data. On success, the processor outputs confirmation lines like / AutoSys/JIL: Successfully inserted job: jobname / with the number of jobs processed and errors.
Q06 of 06SENIOR
What should you do if you accidentally run delete_box on the wrong box?
ANSWER
First, stay calm. There is no undo command in JIL. The only recovery path is to re-import from a prior backup. If you had previously run autorep -J boxname% -q > backup.jil, you can restore all jobs and the box with jil < backup.jil. If no backup exists, you'll need to manually recreate every job — which is why backing up before any delete operation is non-negotiable in production.
01
What is JIL in AutoSys and how is it used?
JUNIOR
02
What is the difference between delete_job and delete_box in JIL?
SENIOR
03
What is the difference between insert_job and update_job?
JUNIOR
04
How do you view the JIL definition of an existing AutoSys job?
JUNIOR
05
How do you import a JIL script file into AutoSys?
JUNIOR
06
What should you do if you accidentally run delete_box on the wrong box?
SENIOR
FAQ · 6 QUESTIONS
Frequently Asked Questions
01
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.
Was this helpful?
02
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.
Was this helpful?
03
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.
Was this helpful?
04
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.
Was this helpful?
05
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.
Was this helpful?
06
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.