AutoSys Job Types — Missing box_name Creates Empty BOX
Parent BOX job succeeds but nothing runs? The missing box_name attribute causes silent failure.
20+ years shipping production infrastructure and CI/CD at scale. Everything here is grounded in real deployments.
- CMD jobs execute commands or scripts on a target machine. Exit code 0 = success.
- BOX jobs are containers that control when child jobs run. They don't execute anything.
- File Watcher jobs watch for file arrival and trigger dependent jobs.
- Performance: File Watcher polls every 30-60 seconds — set watch_interval to balance latency vs load.
- Production insight: Box jobs fail if any child fails — know the ripple effect before building deep hierarchies.
- Biggest mistake: Using depends_on without a healthcheck in Docker, but here it's forgetting box_name on child CMD jobs.
Think of job types like different types of workers. CMD jobs are the workers who actually do the task. BOX jobs are the supervisor who groups workers together and controls their schedule. File Watcher jobs are the security guard who watches the door and calls the team the moment a specific file (package) arrives.
Every job in AutoSys has a job_type attribute that determines its fundamental behaviour. There are only three native job types, and understanding what each one does — and more importantly when to use each — is essential for building effective AutoSys workflows.
In practice, most AutoSys environments are built from a combination of all three types working together: BOX jobs contain CMD jobs, and File Watcher jobs trigger other jobs when files arrive.
How AutoSys JIL Defines a BOX Without a box_name
In AutoSys, a BOX is a container job type that groups other jobs (commands, file watchers, other boxes) for scheduling and dependency management. The JIL (Job Information Language) definition for a box_type job requires a box_name attribute to identify the container. When box_name is omitted, AutoSys creates an empty BOX — a valid job object with no child jobs, no start conditions, and no runtime behavior. This is not an error; the system accepts the definition silently, but the resulting job does nothing.
A box_type job without box_name has no parent-child relationships. It exists in the database with status INACTIVE, never transitions to RUNNING, and cannot trigger downstream jobs. The job definition still consumes a slot in the job stream, but it contributes zero logic. This is distinct from a command job with a missing command — that fails on execution. A box without box_name succeeds at definition but fails at purpose.
Use this pattern intentionally only when you need a placeholder — a stub that reserves a job name for future expansion. In production, it is almost always a mistake. Teams often discover empty BOXes during incident triage: a job stream appears to hang because a parent BOX is empty, so no child jobs ever start. The fix is to either supply the correct box_name or delete the definition. Always validate JIL with a dry-run or schema check before deployment.
CMD — the command job
CMD (or just 'c' in JIL shorthand) is the most common job type. It executes a command, script, or program on a specified machine.
The job runs as the specified owner user on the machine. Whatever exit code the command returns determines the job status: exit code 0 means SUCCESS, any non-zero exit code means FAILURE.
- Shell scripts
- Python or Perl scripts
- Java programs invoked from command line
- Database scripts called via sqlplus, psql, or similar
- Any executable that can be called from a command line
BOX — the container job
A BOX job is a container that holds other jobs (including other BOX jobs). The BOX itself doesn't execute any command — it controls when the jobs inside it can start.
- Jobs inside a box will only run if the box is in RUNNING state
- The box enters RUNNING state when its own start conditions are met
- The box moves to SUCCESS only when ALL inner jobs have succeeded
- The box moves to FAILURE if any inner job fails
- If you put a box inside another box, the parent box must be RUNNING for the inner box to run
BOX jobs are how you group related batch processes together. A typical end-of-day processing flow might have one parent box containing several child boxes, each of which contains the actual CMD jobs.
File Watcher — the event-driven trigger
A File Watcher job does exactly what the name says: it watches for a file on a machine. When the file appears (and optionally reaches a minimum size, indicating it's finished being written), the File Watcher job completes with SUCCESS, which then triggers dependent CMD jobs.
File Watcher jobs are essential in integration scenarios where an upstream system drops a file that downstream processing depends on. Instead of scheduling the downstream job at a fixed time and hoping the file is there, you let the File Watcher trigger it the moment the file actually arrives.
watch_file— the full path and filename to watch for (supports wildcards)watch_interval— how often to check (in seconds, default 60)min_file_size— minimum file size in bytes before declaring successwatch_file_min_size— same as above, alternate attribute name
Choosing the Right Job Type for the Task
While the three job types serve distinct purposes, real workflows blend them. Guidance:
- Use CMD for any executable work. This is your default job type.
- Use BOX to group jobs that must complete together before something else runs. A box ensures atomicity of a batch step.
- Use File Watcher when processing depends on external file arrival. Do not use a fixed schedule if arrival time is unpredictable.
- Avoid using BOX as a simple scheduler — use date_conditions on individual jobs if you don't need container semantics.
- Consider FW inside a BOX to start a batch sequence when a file arrives — the FW succeeds, then triggers the downstream CMD inside the same box.
- If the work is a script or program → CMD
- If you need to control a group of jobs as a unit → BOX
- If the start signal is an external file → File Watcher
- If you need all three → nested BOX containing FW and CMD tasks
Job Type Limitations and Gotchas
Each job type has constraints that bite in production:
- CMD jobs cannot be inside a box without box_name attribute. Missing it means the job runs independently.
- BOX jobs cannot have a machine attribute — they don't execute commands. Adding one is harmless but confusing.
- File Watcher jobs only watch one directory/pattern at a time. To watch multiple patterns, create multiple FW jobs.
- File Watcher jobs succeed once. To re-trigger on a new file each day, you need date_conditions and a run_window.
- BOX jobs with many children can take a long time to report final status because it awaits all children. Use alarms to detect partial failures early.
How Job Types Behave During Box Abort — What the Docs Won't Tell You
A BOX job aborts. What happens to its children? The answer depends on the job type and the abort strategy you set. CMD jobs inside a box follow the BOX's abort setting — if the BOX aborts, they get killed unless you set 'term_run' to force them to completion. But File Watcher jobs? They ignore the BOX abort entirely. The watcher keeps running until it triggers or you manually kill it. This is a common source of zombie processes in production. The WHY: File Watcher is event-driven, not a task that can be killed mid-execution. The BOX doesn't 'own' it the same way. If you need a File Watcher to stop when its parent box aborts, you have to wrap it in a CMD job that polls the watcher's status or set a MAX_RETRY on the watcher itself. Otherwise, expect orphan triggers.
Why File Watcher Jobs Fail Silently — and How to Catch Them
File Watcher jobs are notorious for failing without alerting anyone. The root cause: they don't execute a command. They only check for a file condition. If the file never arrives, the watcher stays in RUNNING state forever. No exit code. No error message. You only notice when a downstream job times out. The fix is brutal but necessary: always set a retry limit and a time window. Use 'max_runs' to cap the number of watcher evaluations. Use 'watch_interval' and 'max_wait' to enforce a timeout. Never let a File Watcher run indefinitely. The second trick: use the 'trigger_on_failure' attribute on the file condition itself — not the job. This way, if the file never appears, you can fire a failure job that sends an alert. Without this, your watcher is a silent black hole.
Mixing CMD and BOX Jobs for State Dependencies — the Missing Pattern
You have three independent systems that need data in order. A batch process, a database export, and an FTP push. The naive approach: chain them with conditions in a linear sequence. The problem? If the first job fails, everything downstream waits forever. A better pattern: use a BOX job as a state tracker. Put each job in the box with 'max_run_alarm' and 'term_run' set to 1. This gives you a single point of control. You can abort the entire batch on any failure. But you can also inspect the box's status to determine if the batch is 'running' or 'failed' without checking individual jobs. The real power: use the box's exit code as a global status. When the box finishes, the exit code reflects the worst child status. This lets you trigger a cleanup job outside the box based on the final outcome — not just individual job status.
Press Win + R: The Unsung DevOps Shortcut for JIL Job Management
Before you open a terminal or SSH into a remote box, press Win + R. This Windows Run dialog is your fastest path to launching AutoSys tools without navigating menus. Why does this matter? Because DevOps velocity depends on reducing friction. Instead of hunting for the AutoSys client shortcut or typing full paths, Win + R lets you run autorep, jil, or sendevent directly if your environment variables are set. For JIL job types like CMD, BOX, or File Watcher, you can quickly verify job definitions or trigger manual events from your workstation. The Run dialog also supports UNC paths and command-line arguments, so you can paste a full AutoSys command like autorep -j MY_BOX -q to inspect a box definition. This habit cuts seconds per operation — and over a day, that adds up to real productivity gains. Set your PATH to include the AutoSys bin directory, and Win + R becomes your silent partner in debugging job types without ceremony.
autorep -V immediately after setup to avoid wasted time during incident response.Change the Color: Visual Distinction for Job Types in AutoSys GUI
AutoSys allows job color customization in the Console or Application Browser, but most teams overlook this simple tactic. Why change colors? When you have a box containing dozens of CMD jobs, File Watcher triggers, and nested boxes, visual cues prevent misreads during a box abort. Assign distinct colors per job type — for example, blue for CMD, green for BOX, orange for File Watcher. This turns a monochrome job list into an instant status map. To change the color, open the job definition in AutoSys Console, navigate to the Display tab (or equivalent in your version), and set the 'Job Color' property. In JIL, add color: lightblue to your job definition. For File Watcher jobs, use color: orange to highlight event-driven triggers that may fail silently. When monitoring a box abort, a red (failed) box with orange File Watchers inside immediately signals that the trigger never fired. Color is not cosmetic — it's a diagnostic shorthand that reduces cognitive load during firefights. Standardize this across your team to turn job lists into visual dashboards.
autorep -j after box abort scenarios; color is a visual aid, not a status indicator.The Box That Never Started: Nested Hierarchy Mistake
- Always verify child jobs have the box_name attribute set to the correct parent box.
- Use autorep -q <box_name> -w to list all jobs inside a box and confirm membership.
- Never assume that job definitions placed under a box heading in JIL automatically belong to it.
ping <machine>autorep -q <job> -w | grep -i statusKey takeaways
Common mistakes to avoid
5 patternsAdding a machine attribute to a BOX job
Not setting min_file_size on File Watcher jobs
Forgetting to set box_name on child CMD jobs
Expecting a File Watcher job to re-trigger multiple times in one day
Using a BOX job to run a single CMD job
Interview Questions on This Topic
What are the three job types in AutoSys?
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