boxlang-scheduled-taskslisted
Install: claude install-skill ortus-boxlang/skills
# BoxLang Scheduled Tasks
## Overview
BoxLang offers two scheduling models:
1. **Scheduler DSL (in-process code execution)** using scheduler classes backed by `BaseScheduler` and `ScheduledTask`
2. **`bx:schedule` component (HTTP-driven tasks)** for create/update/delete/pause/resume/list/run task endpoints
Use the Scheduler DSL for rich in-process logic and task callbacks. Use `bx:schedule` for simple persistent URL triggers.
## Application.bx Integration
You can register scheduler classes directly in `Application.bx` so they are auto-discovered for the app context.
For full descriptor behavior (app discovery, multi-app isolation, lifecycle), see
[`application-descriptor`](../application-descriptor/SKILL.md).
```boxlang
class {
this.name = "MyApp"
// Auto-register scheduler classes for this application
this.schedulers = [
"schedulers.DailyMaintenance",
"schedulers.HourlyReports"
]
}
```
Use this when scheduler lifecycle should be managed with application startup/shutdown rather than ad-hoc `schedulerStart()` calls.
## Option 1: Scheduler DSL (Recommended for Code Workloads)
A scheduler class wraps `BaseScheduler` and registers tasks fluently in `configure()`.
```boxlang
class {
property name="scheduler"
property name="logger"
function configure() {
scheduler
.setSchedulerName( "reporting-scheduler" )
.setTimezone( "America/Chicago" )
scheduler.task( "daily-report", "reports"