AutoSys Calendars: The 1 Schedule That Stops Jobs at Year-End
- AutoSys calendars are named date lists that let you schedule jobs on business days, holidays, or any custom date pattern.
- Use run_calendar to specify which days to run; use exclude_calendar to skip specific dates like public holidays.
- Calendars are created and managed with the autocal_asc command.
- 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
Calendar Debug Cheat Sheet
Job not running on expected date — INACTIVE
autorep -J job_name -d | grep -E 'run_calendar|exclude_calendar'autocal_asc -r $(autorep -J job_name -q | grep run_calendar | awk '{print $2}')Job runs on holiday — expected skip
autorep -J job_name -d | grep exclude_calendarautocal_asc -r exclude_calendar_name | grep $(date +%Y%m%d)Job runs on weekend — unexpected
autorep -J job_name -d | grep -E 'run_calendar|days_of_week'autocal_asc -r calendar_name | grep -E 'Saturday|Sunday'autocal_asc error 'Duplicate date'
autocal_asc -r calendar_name | sort | uniq -decho 'Dates must be unique and sorted in ascending order'Calendar not found — JIL error on update
autocal_asc -r % | grep -i calendar_nameecho 'Calendar names are case-sensitive. Business_Days != business_days'Production Incident
business_days_2025 was created as a standard calendar with explicit dates for 2025. On January 1, 2026, the calendar had no dates. The job's date condition checked the run_calendar, found no match, and remained INACTIVE. No alarm fired because the job didn't fail — it just never started. The team had no automated process to update calendars annually. The calendar naming convention included the year, but no reminder or audit existed to create business_days_2026 before January 1.business_days_2026 with 2026 business dates.
2. Updated job JIL: update_job: monthly_recon run_calendar: business_days_2026.
3. Automated calendar creation: added a scheduled AutoSys job that runs on December 15 each year to create next year's business day calendar using a script that calculates business dates (excluding weekends and holidays).
4. Added a monitoring alert: weekly check for any job with run_calendar containing previous year's dates, flagging them for review.
5. Changed naming convention to business_days (without year) for dynamic calendars using extended calendar logic (when available).Production Debug GuideSymptom → Action mapping for common calendar failures in production AutoSys environments.
autorep -J job_name -d | grep run_calendar. Then verify calendar contents: autocal_asc -r calendar_name. If calendar is year-specific (e.g., 2025), it may have expired.autorep -J job_name -d | grep exclude_calendar. Verify exclude_calendar contains the holiday date: autocal_asc -r exclude_calendar_name.autocal_asc -r calendar_name. Ensure date format is YYYYMMDD. For standard calendars, dates must be sorted. Check for trailing commas in date list.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.
Standard calendars — a list of dates
A standard calendar is simply a named list of dates. Jobs with run_calendar: your_calendar_name will run on those dates and only those dates.
# Create a standard calendar using autocal_asc (interactive or file mode) autocal_asc << 'EOF' insert_calendar: business_days_2026 calendar_type: standard dates: 20260102, 20260105, 20260106, 20260107, 20260108, 20260109 /* ... continuing for all business days in 2026 ... */ EOF # Create a holiday exclusion calendar autocal_asc << 'EOF' insert_calendar: uk_public_holidays_2026 calendar_type: standard dates: 20260101, 20260403, 20260406, 20260504, 20260525, 20260831, 20261225, 20261228 EOF
Using run_calendar and exclude_calendar
Once calendars are defined, apply them to jobs with run_calendar (run on these days) and exclude_calendar (don't run on these days).
/* Run on all business days in 2026, but skip UK public holidays */ insert_job: daily_settlement job_type: CMD command: /scripts/settlement.sh machine: finance-server owner: finuser date_conditions: 1 start_times: "18:00" run_calendar: business_days_2026 exclude_calendar: uk_public_holidays_2026 /* Month-end job: runs only on last business day of each month */ insert_job: month_end_close job_type: CMD command: /scripts/month_end.sh machine: finance-server owner: finuser date_conditions: 1 start_times: "20:00" run_calendar: month_end_2026
Viewing and managing existing calendars
You can query, list, and report on existing calendars using autocal_asc in report mode. This is useful when you need to audit which jobs are using which calendars, or verify a calendar's dates before a major batch run.
# List all calendars in the AutoSys instance autocal_asc -r % # View dates in a specific calendar autocal_asc -r business_days_2026 # Delete an obsolete calendar autocal_asc << 'EOF' delete_calendar: old_2025_holidays EOF # Find all jobs using a specific calendar autorep -J % -q | grep -B5 'run_calendar: business_days_2026'
autorep -J % -q to find jobs referencing a calendar.autorep -J % -q | grep run_calendar | grep 2025 to alert on expired calendars before they cause job failures.| Scheduling Method | Use When... | Attributes Used | Maintenance Burden | Example |
|---|---|---|---|---|
| days_of_week | Simple day-of-week rules (every weekday, every weekend) | days_of_week: mon-fri | Low (no annual updates) | Run every weekday |
| run_calendar | Custom date lists (business days, month-end, quarter-end) | run_calendar: calendar_name | High (requires annual calendar updates) | Run only on last business day of month |
| exclude_calendar | Skip specific dates (public holidays) | exclude_calendar: calendar_name | Medium (update holiday list annually) | Run business days except holidays |
| Both run_calendar + exclude_calendar | Business days minus holidays | run_calendar + exclude_calendar | High (both calendars need updates) | Run business days, skip Christmas |
| Extended calendar (logical rules) | Dynamic date patterns (last weekday of month, nth day of month) | calendar_type: extended | Low (rules are static, no date updates) | Last business day of each month |
🎯 Key Takeaways
- AutoSys calendars are named date lists that let you schedule jobs on business days, holidays, or any custom date pattern.
- Use run_calendar to specify which days to run; use exclude_calendar to skip specific dates like public holidays.
- Calendars are created and managed with the autocal_asc command.
- Standard calendars with explicit dates must be updated annually — automate this process to avoid job failures.
- Never set both days_of_week and run_calendar on the same job — they intersect, not union, leading to unexpected missing runs.
⚠ Common Mistakes to Avoid
Interview Questions on This Topic
- QWhat is a run_calendar in AutoSys?JuniorReveal
- QWhat is the difference between run_calendar and exclude_calendar?JuniorReveal
- QHow do you create a calendar in AutoSys?Mid-levelReveal
- QWhat is the autocal_asc command used for?Mid-levelReveal
- QWhat happens if both days_of_week and run_calendar are set on a job?SeniorReveal
Frequently Asked Questions
What is run_calendar in AutoSys?
run_calendar is a job attribute that specifies a named AutoSys calendar. The job will only run on the dates defined in that calendar, rather than using the standard days_of_week scheduling.
How do I create an AutoSys calendar?
Use the autocal_asc command to create, update, and manage calendar definitions. You can run it interactively or redirect a calendar definition file to it. The WCC web interface also has a calendar management section.
What is exclude_calendar in AutoSys?
exclude_calendar specifies dates on which the job should NOT run, even if those dates are in the run_calendar or match days_of_week. It's commonly used to exclude public holidays from a business day schedule.
What happens when both days_of_week and run_calendar are set?
When both are set, the job runs on days that satisfy BOTH conditions — the day must be in the run_calendar AND must be one of the specified days_of_week. This is typically not intended; usually you set one or the other.
Do AutoSys calendars need to be updated each year?
Yes, if you're using standard calendars with explicit date lists, they must be updated to include the new year's dates. Many organisations automate this as an annual administrative task at year-end. Extended calendars (logical rules) never need date updates.
What's the difference between standard and extended calendars?
Standard calendars are explicit date lists (e.g., dates: 20260101, 20260102). Extended calendars are logical rules (e.g., last_weekday_of_month: jan,feb,mar). Extended calendars are more maintainable because they don't require annual updates. Use extended for recurring patterns (month-end, quarter-end), standard for one-off or static date lists.
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.