AutoSys run_window — Why File Watchers Miss Valid Files
File arrives at 2:57 AM, run_window ends at 3:00 — watcher shows SUCCESS with zero files.
- date_conditions is the master switch: 0 disables all time-based scheduling, 1 enables start_times, days_of_week, and run_calendar
- run_window defines the execution deadline: FW jobs stop detecting files outside it, CMD jobs keep running
- term_run_time kills long-running CMD jobs — run_window doesn't
- Midnight-spanning windows work natively: "22:00 - 06:00" means next day, no extra config
- Production failure: Missing run_window on FW jobs triggers on stale files at 3 AM, filling logs with false alerts
date_conditions is the master switch for time-based scheduling. run_window is the closing time — the job has to be done before the window shuts. Together, they give you precise control over when jobs are allowed to run.
Two attributes that beginners often misuse: date_conditions and run_window. They sound related but do different things.
date_conditions toggles whether time scheduling is even active. Set it to 0, and start_times is ignored entirely — only conditions or manual triggers run the job. Set it to 1, and your schedule kicks in.
run_window is a deadline, not a kill switch. For CMD jobs, AutoSys raises an alarm when the window closes but won't terminate the job unless you also set term_run_time. For File Watcher jobs, the window is strict — no file detection outside those hours. That difference trips up teams constantly.
date_conditions deep dive
date_conditions is binary — 0 or 1. When it's 0 (the default), the job has no time-based schedule. It only runs when explicitly triggered: manually via sendevent, or by a condition (another job's success/failure) evaluating to true.
When date_conditions is 1, the job has a time-based schedule AND can also have conditions. It runs when its time conditions are met AND its dependency conditions (if any) are all true.
Here's the piece that confuses people: setting date_conditions to 1 does NOT override conditions. The job still waits for its condition dependencies. The time schedule just adds another gate.
- date_conditions: 0 → Time = always true. Only conditions matter.
- date_conditions: 1 → Time = active gate. Must be true AND all conditions true.
- Neither setting makes conditions go away — they're always evaluated.
- If you want time OR conditions (not AND), you need two separate jobs with an OR dependency box.
run_window — the execution window
run_window defines the hours during which a job is permitted to run. It works differently depending on job type.
For CMD jobs: If the job starts and is still running when the window closes, AutoSys raises a max_run_alarm (if configured) but doesn't automatically kill it — term_run_time does that. The window is advisory: a polite suggestion, not a hard stop.
For File Watcher jobs: The watcher only looks for files during the run_window. Outside the window, it won't detect files even if they're present. This is the most important use of run_window — it's enforced, not advisory.
For Box jobs: run_window applies to the box itself. Jobs inside the box inherit the box's window only if they don't have their own run_window defined.
Midnight-spanning windows
run_window windows that span midnight (e.g., "22:00 - 06:00") work correctly in AutoSys — the end time next day is understood automatically. This is common for overnight batch windows.
No special syntax needed. Just write the start time and end time. AutoSys compares current time against the window logically: if start > end, the window crosses midnight.
The 3 AM File Watcher That Never Saw the File
- run_window for FW jobs is a detection gate — files outside the window are invisible, not queued.
- Always test edge arrival times against the run_window boundary using a file with a timestamp 1 minute before close.
- For SLA-critical files, add a second FW job with a wider window or remove date_conditions entirely and rely on file age logic.
Key takeaways
Common mistakes to avoid
4 patternsAssuming run_window kills CMD jobs
Using date_conditions: 0 while expecting start_times to work
No run_window on File Watcher jobs
run_window start/end swapped for overnight windows
Interview Questions on This Topic
What is the difference between date_conditions and run_window in AutoSys?
Frequently Asked Questions
JIL syntax, sendevent, autorep, box jobs, file watchers, scheduling, HA, security, cloud workload automation, and 22 interview questions — the definitive AutoSys reference for production engineers.
That's AutoSys. Mark it forged?
3 min read · try the examples if you haven't