Tasks
On this page
Tasks
The Tasks page lists the scheduled tasks of this server, from every place a scheduler can come from. It reads them from BoxLang's SchedulerService and from tasks.json. Viewing is free. The actions and the run history need BoxLang+.

Three tabs
| Tab | What it shows |
|---|---|
| Schedule | Every task, grouped the way you choose. |
| Coming up | What runs next, in time order, under the headings Due now, In the next hour, Later today and Later. |
| Needs attention | The tasks to look at and why. A red mark is a failure, an amber one a warning. |
The schedule of a task is shown in words: every 120 s reads "Every 2 minutes" and cron 0 0 18 * * 1-5 reads "Weekdays at 18:00". The exact text is in the task panel.
Group by, and the source
Group by has five choices: Scheduler, Group, Application, Source and None. A filter row shows the status (All, Scheduled, Paused, Failing, Not run yet), and a search box looks in the task, group, scheduler and application.
BoxLang has several ways to define a scheduler, and the source says which one a task came from:
| Source | Where it comes from |
|---|---|
| tasks.json | The tasks.json file of the runtime (scheduler.tasksFile). |
| Global scheduler | A scheduler class listed in the scheduler.schedulers setting of boxlang.json. |
| Application | A scheduler class an application lists in this.schedulers in Application.bx. It starts and stops with the application. |
| A-la-carte | A scheduler created while code runs, with schedulerNew or schedulerStart. |
| ColdBox app, ColdBox module | The scheduler of a ColdBox application, or of one of its modules. See ColdBox. |
Click a source chip to show only those tasks. An application scheduler is also listed under its application on the Applications page.
On a runtime without that fix, a scheduler class listed in scheduler.schedulers registers with a random name and no tasks, because core did not run its configure(). BxLens shows it as an empty scheduler named after its class file.

Statuses
| Status | Meaning |
|---|---|
| scheduled | Enabled and waiting for its next run. |
| paused | Disabled. |
| failing | Its last run ended in an error (Lens remembers this since it started). |
| not run yet | Enabled and has never run. |
| error | The scheduler could not schedule it. The scheduling error is shown in the detail. |
There is no "running now" flag, because core does not expose one.
Groups
A task can belong to a group: "group": "maintenance" in tasks.json, or setGroup( "maintenance" ) in code. A group is a path, so billing/invoices sits under billing. Group by Group shows one card per group, with its tasks, whichever scheduler owns them. Ungrouped holds the tasks that have no group, so nothing is hidden.
The task panel
Click a task. The panel shows:
- The last error, when the last run failed, with a Fix it hint: what the message usually means and what to try. There are hints for a refused connection, an unknown host, a timeout, a missing file, an out of memory error, refused credentials, a database error and an invalid cron expression. A stack trace is behind a collapsible line.
- The last result, when the last run succeeded and returned something.
- Runs, successes and failures, and the scheduler, where it is defined (the file of the scheduler class or
tasks.json), executor, group, schedule, last run, next run and host. - The run trend, errors by message and the latest runs (BoxLang+, see below).
- Meta, what the code attached with
setMeta( { owner : "finance" } )or ametaentry intasks.json: an owner, a runbook link, an SLA. A value whose key looks like a secret (token,password,apiKeyand so on) is masked, long values are cut at 200 characters and at most 30 keys are shown. - The definition from
tasks.json, with sensitive keys masked, and any scheduling error.
Run history
On Free the page keeps the totals and the last result or error of each task. Run history is a BoxLang+ feature (taskHistory): nothing is recorded on Free, and GET tasks/history answers 403.
With BoxLang+, BxLens records every run of every task: when it started, how long it took and how it ended. The panel shows:
- Run trend: the last 60 runs as bars, a failed run in red and the median as a dashed line.
- Median, Slowest 5%, Longest and Failed, with how many failures are in a row now.
- Errors by message: the failed runs grouped by message, with how many and when the last one was.
- Latest runs: the newest 15 with the time, the result and the message.
Runs are kept per task (200 by default), in all (50,000) and for 15 days. All three are set in Settings, Schedulers. They are saved with the disk store and survive a restart.
A run is timed by BxLens itself. Core stores the duration of a run after it announces that the run ended, so an event handler cannot read it.
ColdBox history is sampled
ColdBox does not announce its task runs through the BoxLang scheduler events. BxLens looks at the counters of each ColdBox task every schedulers.coldbox.sampleSeconds (10) seconds, and when totalRuns went up it records that many runs. The first look of a task sets a baseline, so earlier runs are not invented. A run is dated by the last run of the task and timed by the last execution time, so the runs between two looks share them. The panel says "sampled". On a real ColdBox application with seven tasks one look took a median of 4.7 ms.
Needs attention
The list comes from one decision, shared by the page, the alert rules and Lensy. From the totals (always):
- Could not be scheduled: core refused the task, for example because of an invalid cron expression.
- Failing: the last run failed and the task fails at least as often as it succeeds.
- Scheduler not started while it holds tasks.
From the run history (BoxLang+):
- Failing lately: half or more of the last 10 runs failed, even when the totals look fine. At least 3 runs are needed.
- Late: the next run is past by more than twice the period and the task did not run. Only tasks with a fixed period (
every ...) are judged, because a cron expression has no period. - Slow: the last run took more than 3 times the usual median and at least 2 seconds. At least 5 runs are needed.
- Paused for days: a task that BxLens has seen paused for 7 days.

Every number is a setting in Settings, Schedulers: schedulers.attention.recentRuns, failPct, overdueFactor, slowFactor, slowMinMs and pausedDays.
Alerts
Four alert rules read the same reasons (BoxLang+, off until you switch them on in Settings, Notifications): Scheduled task failing lately, Scheduled task late, Scheduled task slow and Scheduled task not scheduled. The existing Scheduled task failing rule is unchanged. See the alert runbook.
Ask Lensy
The tasks tool tells Lensy where each scheduler comes from and why a task needs attention. Given a scheduler and a task, it returns the run history of that task instead (BoxLang+): the median, the slowest and failed runs, the errors by message and the newest runs.
Actions
Run now, pause, resume and reload need BoxLang+ or a trial. On Free the page shows a BoxLang+ note, the buttons are disabled and the server answers 403. You still see every task, its last result or error and its definition.
| Action | What it does |
|---|---|
| Run now | Runs the task once. See below. |
| Pause, Resume | Disable or enable one task. Lens tells the scheduler service, as a pause from code does. |
| Pause all, Resume all | The same for every task in one scheduler. |
| Reload | Re-reads tasks.json and restarts the scheduler. Asks first, because running tasks finish before the restart. |
| Reload all from tasks.json | Reload for every scheduler. |
Actions are logged with the caller's address. Set console.actions to false to disable them. The buttons are then greyed out and the server refuses the calls.
Run now
Run now starts the task once on its own virtual thread and waits up to console.runTimeoutSeconds (60). Other tasks are not affected, and the normal schedule goes on.

- If it finishes you see the time it took and the result, or "Finished. The task returned nothing."
- If it throws you see the error and the stack trace, and the task becomes
failing. - If it is still running when the wait ends, the console says so and the task keeps going in the background.
Known limits
- Run history starts when BxLens starts. Runs before that are not known.
- Core keeps run counts but not the error of the last run. Lens remembers outcomes in memory from the moment it starts, so a failure before that is not shown. Reloading a scheduler clears its remembered outcomes. Reload only applies to the tasks.json schedulers.
- For cron tasks, Next run is computed from the cron expression and the scheduler's time zone, not read from core.
- Core has no "running now" flag, so a task that is mid-run still shows as scheduled.
- This page covers this server only. It does not see other nodes.