AutoSys run_calendar — Jobs Go Silent When Calendars Expire
Static calendars like business_days_2025 have no dates after Dec 31st.
20+ years shipping production infrastructure and CI/CD at scale. Notes here come from systems that actually shipped.
- ✓Solid grasp of fundamentals
- ✓Comfortable reading code examples
- ✓Basic production concepts
- AutoSys calendar = named date list for scheduling jobs on business days, holidays, or custom patterns — standard (explicit dates) or extended (logical rules)
- Key components: run_calendar (run on these dates), exclude_calendar (skip these dates), autocal_asc (calendar management command)
- Performance: Calendar lookup is O(1) hash check per job evaluation; 10,000 jobs with calendars = minimal overhead
- Production trap: Calendar with explicit dates not updated at year-end — jobs scheduled on expired calendar never run again
- Biggest mistake: Setting both days_of_week AND run_calendar — runs only on intersection (days that satisfy both), often unintended, causes jobs to never run
AutoSys calendars are custom day lists — like a company holiday calendar for your batch jobs. Instead of just 'run on weekdays', you can say 'run on every business day that isn't a public holiday or month-end close' — and AutoSys handles the date logic for you.
Time-based scheduling with days_of_week covers most simple cases, but enterprise batch processing often needs more nuanced scheduling. Month-end jobs that only run on the last business day. Jobs that must skip public holidays. Quarter-end runs. AutoSys calendars solve exactly this.
There are two calendar types: standard calendars (a list of dates) and extended calendars (built from logical rules). Both are defined using the autocal_asc command or through the WCC UI.
But calendars are dangerous. A calendar with explicit dates for 2025 will stop working on January 1, 2026. Jobs that depend on it will never run again. The intersection between days_of_week and run_calendar is another trap — if you set both, the job runs only on days that satisfy BOTH conditions, which is rarely what you intend.
By the end you'll know exactly how to create and manage calendars, use run_calendar and exclude_calendar correctly, avoid the year-end trap, and debug why a job isn't running on days you expect it to.
How run_calendar Silences Jobs When It Expires
run_calendar is a named calendar object in AutoSys that defines a set of dates on which a job is allowed to run. When attached to a job definition via the run_calendar attribute, the job will only execute if the current date is included in that calendar. The core mechanic: calendars are evaluated at job start time, and if the date is not in the calendar, the job is skipped — it does not fail, it simply does not start. This is a binary gate: present in calendar → runs; absent → silent skip.
Calendars are typically defined as a list of specific dates (e.g., '2025-01-01', '2025-01-15') or as a repeating pattern (e.g., 'every Monday'). The critical property: calendars have an end date. Once the last defined date passes, the calendar is effectively expired. Any job referencing an expired calendar will never run again, because no future date will ever match. AutoSys does not warn or alert on this condition — the job simply stops starting. The job status remains INACTIVE or SUCCESS, with no error code.
Use run_calendar when you need to restrict job execution to specific business days, holidays, or maintenance windows. It is essential for batch processing that must only run on certain days (e.g., month-end reports, quarterly payroll). The danger: teams often set calendars with a fixed end date and forget to extend them. When the calendar expires, the job goes silent — no alerts, no failures, just a gap in processing that may go unnoticed until a downstream system breaks.