Business-day job schedule
business_day_scheduleCalculate business-day and public-holiday schedules that cron cannot express, returning upcoming run times and whether a job runs on a given date for payroll, billing, reporting, and batch jobs.
Instructions
Schedules that understand business days and public holidays, which cron cannot express: "3rd business day of the month at 09:00", "last business day", "every Monday, or the next business day if it is a holiday", "the 25th, modified following", or any cron expression with a holiday rule. Returns the next run times and whether the job should run on a given date (today by default). Country holidays, custom holidays and workweeks, DST-aware. Use for payroll, billing, reporting and batch jobs. First 25 calls per day are free, then $0.001 per call (x402).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"rule": "<rule>"
},
"name": "business_day_schedule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | nth_business_day: 1 = first business day of the month, 3 = third; -1 = last, -2 = second to last. Not 0 | |
| day | No | day_of_month: 1–31 (31 means the last day in shorter months) or "last" | |
| from | No | Runs at or after this time: YYYY-MM-DD (local midnight), local YYYY-MM-DDTHH:MM, or ISO 8601 with offset. Default: now | |
| rule | Yes | nth_business_day needs n; day_of_month needs day; weekly needs weekdays; cron needs expression | |
| time | No | Local run time HH:MM for nth_business_day, day_of_month and weekly (cron uses its own times) | 09:00 |
| count | No | How many runs to return (searches up to 10 years ahead) | |
| adjust | No | When a scheduled date is a weekend or holiday: move to the next/previous business day; modified_following = next unless that crosses into the next month, then previous; nearest (ties go earlier); skip the run; or none. Not used by nth_business_day | next |
| months | No | Only these months, e.g. [1,4,7,10] for quarterly | |
| country | No | ISO 3166-1 alpha-2 country code (207 countries); its public holidays (2000–2050) are excluded from business days | |
| holidays | No | Extra dates excluded from business-day counts (rest days from workdays are always excluded) | |
| timezone | No | IANA time zone, e.g. America/New_York (default UTC) | |
| weekdays | No | weekly: weekday numbers, 0 = Sunday, e.g. [1] for every Monday | |
| workdays | No | Working days of the week, 0 = Sunday. Default [1,2,3,4,5] (Mon–Fri); e.g. [0,1,2,3,4] for Sun–Thu or [1,2,3,4,5,6] for Mon–Sat | |
| check_date | No | ||
| expression | No | cron: 5 or 6 field cron expression, e.g. "0 9 25 * *". At most 96 runs a day |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | ||
| rule | Yes | ||
| runs | Yes | ||
| check | Yes | ||
| count | Yes | ||
| adjust | Yes | ||
| timezone | Yes | ||
| description | Yes | The schedule in plain English |