05Administration
Scheduled tasks
The background tasks InsightFlare runs, and how to inspect them.
InsightFlare runs background work on a schedule. A Worker cron trigger runs every 30 minutes (*/30 * * * * in wrangler.toml) and dispatches the tasks that are due.
Built-in tasks
| Task | Schedule | What it does |
|---|---|---|
Hourly visit aggregation (visit_hourly_rollup) | Every hour | Aggregates closed visit rows into hourly rollups for dashboard counters and trends. |
Notification dispatch (notification_tick) | Every 30 minutes | Evaluates notification rules and dispatches messages. |
Database maintenance (database_maintenance) | Every day (UTC) | Removes expired operational records, marks stale runs, and optimizes D1 query statistics. |
Scheduled tasks are disabled in Demo Mode, or when DISABLE_CRON_TASKS is set to 1.
The Scheduled Tasks page
System admins can open Scheduled Tasks in the management area. It shows:
- Runs in the last 24 hours, the success rate (counting only successful runs), problematic runs, and long-running unfinished runs.
- A list of registered tasks with their schedule, whether each is enabled, the last status, 30-day runs, the 30-day success rate, the average duration, and the next run. You can enable or disable a task.
- Run history for the last 30 days with scheduled, started, and finished times, the trigger, duration, and a result summary (for example, sites processed, rows, rules scanned, messages created, and failed emails).
- Run logs for a selected run.
Run statuses are Running, Success, Partial, Failed, and Skipped.
Retention
The history and logs are kept for a configurable number of days. See data retention and system settings.