Home DevOps Box Jobs and Nested Boxes in AutoSys — Complete Guide

Box Jobs and Nested Boxes in AutoSys — Complete Guide

Where developers are forged. · Structured learning · Free forever.
📍 Part of: AutoSys → Topic 10 of 30
Master AutoSys BOX jobs: how they control child job scheduling, how nested boxes work, what Super Box means, and how to debug box issues in production.
⚙️ Intermediate — basic DevOps knowledge assumed
In this tutorial, you'll learn:
  • BOX jobs are containers — they don't execute commands, they control when child jobs can start
  • A box enters SUCCESS only when ALL inner jobs have succeeded; it enters FAILURE if any inner job fails
  • You can nest boxes inside boxes to build hierarchical batch workflows
✦ Plain-English analogy ✦ Real code with output ✦ Interview questions
⚡ Quick Answer
A BOX job in AutoSys is like a project folder on your computer. The folder itself doesn't do any work — it just contains files (child jobs). When you open the folder (start the box), the files inside become available. When all files are complete (all inner jobs succeed), the folder is done. You can even put folders inside folders.

BOX jobs are central to well-organised AutoSys environments. Without boxes, you'd have hundreds of independent jobs with no logical grouping, no shared scheduling, and no way to see the end-to-end status of a business process at a glance. With boxes, you can group related jobs, control their collective schedule, and see in seconds whether your end-of-day run succeeded.

How BOX jobs control child job execution

The box controls three things for its child jobs: 1. When they can start: Child jobs can only start when the box is in RUNNING state 2. The execution environment: All child jobs inherit the box's scheduling context 3. Collective status: The box reports SUCCESS only when ALL child jobs succeed

A child job's own conditions (start_times, conditions) still apply within the box. If Job B has condition: success(Job A), it still waits for Job A even though the box is running.

box_control.jil · BASH
123456789101112131415161718192021222324
/* Box starts at 10 PM on weeknights */
insert_job: eod_box
job_type: BOX
date_conditions: 1
days_of_week: mon-fri
start_times: "22:00"
alarm_if_fail: 1

/* Job A: starts as soon as box is RUNNING */
insert_job: job_a
job_type: CMD
box_name: eod_box
command: /scripts/step_a.sh
machine: server01
owner: batch

/* Job B: waits for Job A, but still inside the box */
insert_job: job_b
job_type: CMD
box_name: eod_box
command: /scripts/step_b.sh
machine: server01
owner: batch
condition: success(job_a)
▶ Output
/* 22:00 — eod_box: RUNNING
22:00 — job_a: STARTING (no condition — starts immediately)
22:12 — job_a: SUCCESS
22:12 — job_b: STARTING (condition met)
22:28 — job_b: SUCCESS
22:28 — eod_box: SUCCESS */

Nested boxes — boxes inside boxes

You can place a BOX job inside another BOX job. This creates a hierarchy that lets you organise complex batch flows into logical sub-processes.

In a nested setup, the parent box must be RUNNING before the child box can start. The child box must be RUNNING before its own child jobs can start. The parent box succeeds only when ALL child boxes (and their contents) have succeeded.

nested_boxes.jil · BASH
12345678910111213141516171819202122232425
/* Parent box — the overall EOD run */
insert_job: master_eod_box
job_type: BOX
date_conditions: 1
days_of_week: mon-fri
start_times: "21:00"

/* Child box 1ETL processing */
insert_job: etl_box
job_type: BOX
box_name: master_eod_box       /* inside master box */

/* Child box 2reporting (runs after ETL) */
insert_job: reporting_box
job_type: BOX
box_name: master_eod_box
condition: success(etl_box)    /* waits for ETL box to complete */

/* Jobs inside etl_box */
insert_job: etl_extract
job_type: CMD
box_name: etl_box
command: /scripts/extract.sh
machine: etl01
owner: batch
🔥
The topmost parent box is called Super BoxIn AutoSys terminology, the highest-level BOX that contains all other boxes and jobs is sometimes called the Super Box. It's the single point of control for an entire batch workflow.

Debugging: box is running but inner jobs aren't starting

This is one of the most common issues you'll encounter. The box is in RUNNING state, but the jobs inside it stay INACTIVE or never start.

Most common causes: 1. The child job's own starting conditions aren't met (check condition attribute) 2. The child job has date_conditions: 1 with a start_times set — it's waiting for that specific time even though the box is running 3. The child job is ON_HOLD or ON_ICE 4. The child job's machine is offline (PEND_MACH) 5. The box_name attribute on the child job has a typo

debug_box.sh · BASH
1234567891011
# Check status of box and all inner jobs
autorep -J eod_box -s

# Check a specific inner job's attributes
autorep -J job_b -d

# Check if an inner job is on hold or on ice
autostatus -J job_b

# Check if the machine for an inner job is active
autorep -M server01
▶ Output
Job Name ST Exit
job_a SU 0
job_b OH <- ON_HOLD — that's why it won't start!
job_c IN <- INACTIVE — waiting
BOX job stateWhat it meansCan inner jobs run?
RUNNINGBox is active, conditions metYes — if their own conditions are met
SUCCESSAll inner jobs succeededNo — box has completed
FAILUREAt least one inner job failedNo — remaining jobs don't start
INACTIVEBox hasn't been triggered yetNo
ON_HOLDBox manually heldNo — box won't start
ON_ICEBox suspendedNo — box won't start

🎯 Key Takeaways

  • BOX jobs are containers — they don't execute commands, they control when child jobs can start
  • A box enters SUCCESS only when ALL inner jobs have succeeded; it enters FAILURE if any inner job fails
  • You can nest boxes inside boxes to build hierarchical batch workflows
  • Child jobs inside a box should generally not have their own start_times — let the box control timing

⚠ Common Mistakes to Avoid

  • Setting date_conditions: 1 and start_times on a child job inside a box — the job will wait until that specific time even if the box is already running; usually child jobs inside boxes should not have their own start_times
  • Putting a machine attribute on a BOX job — it's ignored but signals a misunderstanding of how BOX jobs work
  • Not setting a condition on the second-to-last job in a chain, causing jobs to run in parallel unexpectedly
  • Confusing box state with child job state — a box in RUNNING doesn't mean all children are running; they follow their own conditions

Interview Questions on This Topic

  • QWhat is a BOX job in AutoSys and what does it do?
  • QWhen is a BOX job in SUCCESS state?
  • QIf a BOX job is RUNNING but its child jobs aren't starting, what would you check?
  • QWhat is a Super Box in AutoSys?
  • QCan a BOX job contain another BOX job?

Frequently Asked Questions

What is a BOX job in AutoSys?

A BOX job is a container for other jobs. It doesn't execute any command itself — it groups jobs together and controls when they can run. Child jobs inside a box can only start when the box is in RUNNING state.

When does a BOX job move to SUCCESS?

A BOX job moves to SUCCESS only when ALL of its inner jobs have completed successfully. If any inner job fails, the box moves to FAILURE and remaining un-started inner jobs will not run.

My BOX job is RUNNING but inner jobs aren't starting — why?

Common causes: the inner job has date_conditions: 1 and is waiting for a specific start_times; the inner job has a condition that isn't met yet; the inner job is ON_HOLD or ON_ICE; the inner job's machine is offline; or the box_name attribute has a typo.

What is a Super Box in AutoSys?

Super Box is informal terminology for the highest-level BOX job that contains all other boxes and jobs for a given batch workflow. It provides a single point of control and visibility for the entire process.

Should child jobs inside a box have their own start_times?

Generally no. When a job is inside a box, the box controls the overall timing. Setting start_times on a child job means it will wait until that specific time even if the box is already running, which often causes confusion. Child jobs inside boxes typically rely on conditions (success of previous jobs) rather than clock times.

🔥
Naren Founder & Author

Developer and founder of TheCodeForge. I built this site because I was tired of tutorials that explain what to type without explaining why it works. Every article here is written to make concepts actually click.

← PreviousJIL insert_job update_job delete_jobNext →File Watcher Jobs in AutoSys
Forged with 🔥 at TheCodeForge.io — Where Developers Are Forged