The in-app guide
This is the same guide as Admin → Help: usage, each admin screen, themes, tags, environment, and install.
Schedule and queues
Collectors and analytics prune do not run by themselves — the OS must wake Laravel every minute. PHP / nginx: Environment. Sources are in Collectors; each one only fetches when its interval is due.
What the scheduler does
| Job | When | Notes |
|---|---|---|
| Collect | Every minute | Each source uses its own interval |
| Analytics prune | 03:20 daily | Deletes hits older than 90 days by default |
php artisan serve or Docker for trying things out can skip this. A live site needs at least the cron line below, or collection only runs from the “Collect now” button.
Modes
| CMS_COLLECT_MODE | Behavior | Extra process |
|---|---|---|
schedule (default) | Fetch in the scheduler process | Only cron schedule:run every minute |
queue | Scheduler only enqueues jobs | cron + a long-running queue:work |
off | No automatic runs | Admin button or a manual command |
CMS_STAT_PRUNE_MODE uses the same three values. After editing .env, run php artisan config:clear.
Recommended live minimum
CMS_SCHEDULE_ENABLED=true
CMS_COLLECT_MODE=schedule
CMS_STAT_PRUNE_MODE=schedule
* * * * * cd /var/www/leafcms && php artisan schedule:run >> /dev/null 2>&1
Replace the path with your project root. Linux: crontab. Windows: Task Scheduler, the same php artisan schedule:run every minute.
Queue for large collects
CMS_SCHEDULE_ENABLED=true
CMS_COLLECT_MODE=queue
CMS_COLLECT_QUEUE=cms
CMS_STAT_PRUNE_MODE=queue
CMS_STAT_PRUNE_QUEUE=cms
QUEUE_CONNECTION=database
Do not use QUEUE_CONNECTION=sync or it still runs inline. Use database or Redis.
* * * * * cd /var/www/leafcms && php artisan schedule:run >> /dev/null 2>&1
php artisan queue:work --queue=cms --sleep=1 --tries=1
The second line must stay up (systemd / supervisor). If it dies, collect and prune stop.
Your own cron, no Laravel scheduler
CMS_SCHEDULE_ENABLED=false
* * * * * cd /var/www/leafcms && php artisan cms:collect --sync
20 3 * * * cd /var/www/leafcms && php artisan cms:stat-prune --days=90 --sync
Queue mode: replace --sync with --queue and keep queue:work --queue=cms.
Manual commands
php artisan cms:collect
php artisan cms:collect --force
php artisan cms:collect --id=1 --force
php artisan cms:collect --queue
php artisan cms:collect --sync
php artisan cms:stat-prune --days=90
Docker: docker compose exec app php artisan cms:collect. Demo setups usually skip cron.