AutoSys Calendars and run_calendar — Scheduling by Business Calendar
- 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
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.
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'
Type: standard
Dates: 20260102, 20260105, 20260106 ... (247 business days)
| Scheduling method | Use when... | Attributes used |
|---|---|---|
| days_of_week | Simple day-of-week rules | days_of_week: mon-fri |
| run_calendar | Custom date lists (business days, month-end) | run_calendar: calendar_name |
| exclude_calendar | Skip specific dates (holidays) | exclude_calendar: calendar_name |
| Both run_calendar + exclude_calendar | Business days minus holidays | Both attributes together |
🎯 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
⚠ Common Mistakes to Avoid
- ✕Not updating calendars at year-end — jobs scheduled on the old calendar stop running on the new year's business days
- ✕Setting both days_of_week AND run_calendar — when both are set, a job runs on the intersection: days that appear in both
- ✕Forgetting to create the exclude_calendar before referencing it in a job definition
- ✕Using standard calendars where an extended calendar with business day logic would be more maintainable
Interview Questions on This Topic
- QWhat is a run_calendar in AutoSys?
- QWhat is the difference between run_calendar and exclude_calendar?
- QHow do you create a calendar in AutoSys?
- QWhat is the autocal_asc command used for?
- QWhat happens if both days_of_week and run_calendar are set on a job?
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.
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.