AutoSys delete_box — One Command Wiped 47 Payroll Jobs
Using delete_box instead of delete_job made 47 payroll jobs vanish.
- insert_job creates new job definitions. Fails if the job already exists.
- update_job modifies only the attributes you specify — partial update, not replacement.
- delete_job removes a single job. delete_box removes the box plus all child jobs.
- Each command uses JIL syntax; a typo or missing required attribute stops the entire batch.
- Production insight: delete_box is the most dangerous — it silently wipes entire job trees.
- Biggest mistake: assuming update_job is a full rewrite — it's not, and omitted attributes stay unchanged.
insert_job is like hiring a new employee and filling out their paperwork. update_job is like updating their job description without rehiring them. delete_job is like terminating that employee and removing their record.
Managing jobs in AutoSys means mastering three JIL subcommands: insert_job to create, update_job to modify, and delete_job to remove. These are the bread-and-butter operations you'll perform every week as an AutoSys administrator or developer. You'll see them in every single batch pipeline. And you'll screw them up at least once.
insert_job — creating a new job
insert_job creates a brand-new job definition in the AutoSys Event Server. The job name must be unique within the instance. All required attributes (job_type, machine for CMD jobs, owner) must be included. You cannot insert_job if a job with that name already exists — use update_job instead.
autorep -J newjob -q after insertion — a silent failure (like a typo in machine name) can leave the job orphaned.update_job — modifying an existing job
update_job modifies an existing job definition. You only need to include the attributes you want to change — everything else stays as it was. This is a partial update, not a full replacement.
start_times: "").delete_job and delete_box
delete_job removes a single job. delete_box removes a box and ALL jobs inside it. Always back up definitions before deleting.
autorep -J jobname -q > backup.jil before any delete operation. Once a job is deleted from the Event Server, the history is also gone.Common pitfalls when using JIL subcommands
Even experienced AutoSys admins make mistakes with these commands. The most common: confusing insert and update, forgetting that update is partial, running delete_box when you meant delete_job, and not backing up before deletion. Also: JIL syntax is finicky about whitespace. A missing colon after the subcommand attribute name will cause a parse error.
- POST (insert_job) fails if resource exists.
- PATCH (update_job) only changes included fields.
- DELETE (delete_job) removes one resource.
- Cascading DELETE (delete_box) removes a collection and all its children.
Automating job lifecycle management with scripts
In production, you'll rarely run JIL commands one by one. Instead, you'll build scripts that generate JIL files dynamically and pipe them to the jil command. A common pattern: loop over a list of jobs, check existence, then choose insert or update. Another: after a code deployment, you update batch schedules en masse by generating JIL from a template.
The Quiet Box Deletion That Killed a Payroll Batch
- Never use delete_box without a full autorep -q backup of the entire box tree.
- Always run
autorep -J boxname -q | grep job_namefirst to see what you're about to delete. - Consider renaming delete_box to something less lethal in your runbook — or just ban it in production.
autorep -J jobname to confirm. Use update_job instead. Never try to delete and re-insert — you'll lose history.autorep -J jobname -d. Running jobs ignore updates until next scheduled start. Also verify you spelled the attribute correctly.autorep -J %keyword% to search. Remember: case-sensitive. Also check global vs local instance.Key takeaways
autorep -J jobname -q > backup.jil before making changesCommon mistakes to avoid
5 patternsUsing insert_job on an existing job
Using delete_box when you only want to remove the box container
Not backing up job definitions before delete operations
autorep -J jobname -q > backup.jil before any delete. Store backups in version control.Forgetting that update_job is partial — can't clear an attribute by omitting it
condition: "" or start_times: "".Assuming JIL syntax errors are obvious
autorep -J jobname -q after every JIL operation. Never trust the 'success' output alone.Interview Questions on This Topic
What is the difference between insert_job and update_job?
Frequently Asked Questions
That's AutoSys. Mark it forged?
3 min read · try the examples if you haven't