A file-based task scheduler bundle for Symfony with a built-in web dashboard and full CLI management.
#[AsSchedulableCommand] attribute on your commands. No YAML task definitions, no manual registration, no separate entity classes.composer require caeligo/scheduler-bundle
If you're not using Symfony Flex, add the bundle to config/bundles.php:
return [
// ...
Caeligo\SchedulerBundle\CaeligoSchedulerBundle::class => ['all' => true],
];
Create config/routes/caeligo_scheduler.yaml:
caeligo_scheduler:
resource: '@CaeligoSchedulerBundle/config/routes.yaml'
prefix: /scheduler
Create config/packages/caeligo_scheduler.yaml:
caeligo_scheduler:
route_prefix: '/scheduler'
role_dashboard: 'ROLE_ADMIN'
role_crontab: 'ROLE_SUPER_ADMIN'
default_timeout: 300
For all configuration options, see Configuration Reference.
Add the #[AsSchedulableCommand] attribute to any Symfony console command:
use Caeligo\SchedulerBundle\Attribute\AsSchedulableCommand;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
#[AsCommand(name: 'app:cleanup:expired')]
#[AsSchedulableCommand(
description: 'Remove expired records from the database',
defaultExpression: '0 3 * * *',
group: 'maintenance',
)]
class CleanupExpiredCommand extends Command
{
// ...
}
php bin/console caeligo:scheduler:install
This adds a crontab entry that runs the scheduler every minute:
* * * * * cd '/path/to/project' && '/usr/bin/php' bin/console caeligo:scheduler:run >> /dev/null 2>&1 # caeligo-scheduler
php bin/console caeligo:scheduler:enable app:cleanup:expired
Or use the web dashboard at /scheduler.
php bin/console caeligo:scheduler:list
php bin/console caeligo:scheduler:status
| Command | Description |
|---|---|
caeligo:scheduler:run |
Run overdue scheduled tasks (crontab entry point) |
caeligo:scheduler:list |
List all discovered schedulable commands |
caeligo:scheduler:status |
Show overall scheduler health and status |
caeligo:scheduler:run-now <command> |
Execute a specific task immediately |
caeligo:scheduler:enable <command> |
Enable a scheduled task |
caeligo:scheduler:disable <command> |
Disable a scheduled task |
caeligo:scheduler:install |
Install the scheduler crontab entry |
caeligo:scheduler:uninstall |
Remove the scheduler crontab entry |
caeligo:scheduler:logs |
Show recent task execution logs |
caeligo:scheduler:purge-logs [command] |
Purge execution logs (all or per task) |
For detailed CLI usage, see CLI Reference.
A standalone web dashboard ships with the bundle — no separate admin package or frontend build step needed. Available at the configured route_prefix (default: /scheduler).
For dashboard details, see Dashboard Guide.
| Document | Description |
|---|---|
| Configuration Reference | All configuration options in detail |
| CLI Reference | Detailed usage of all 9 console commands |
| Dashboard Guide | Web dashboard features and usage |
| Scheduling Guide | Cron expressions, intervals, and task options |
| Architecture & Storage | File-based storage, locking, and internals |
| Security | Role-based access, CSRF, and security considerations |
| HTTP Trigger | Shared hosting fallback via HTTP trigger |
| EasyAdmin Integration | Optional EasyAdmin dashboard integration |
| Testing | Running the test suite |
If your project uses a Makefile (common in Symfony projects), you can add convenient shortcut targets:
SYMFONY_CONSOLE = php bin/console
cron-list: ## List all schedulable commands
@$(SYMFONY_CONSOLE) caeligo:scheduler:list
cron-status: ## Scheduler health status
@$(SYMFONY_CONSOLE) caeligo:scheduler:status
cron-run: ## Run overdue tasks once
$(SYMFONY_CONSOLE) caeligo:scheduler:run
cron-run-task: ## Run a specific task (usage: make cron-run-task CMD=app:my:command)
ifndef CMD
@echo "ERROR: CMD is required. Usage: make cron-run-task CMD=app:some:command"
@exit 1
endif
$(SYMFONY_CONSOLE) caeligo:scheduler:run-now $(CMD)
cron-logs: ## Show scheduler execution logs
@$(SYMFONY_CONSOLE) caeligo:scheduler:logs
cron-logs-purge: ## Purge all scheduler logs
@$(SYMFONY_CONSOLE) caeligo:scheduler:purge-logs
cron-install: ## Install crontab entry
$(SYMFONY_CONSOLE) caeligo:scheduler:install
cron-uninstall: ## Uninstall crontab entry
$(SYMFONY_CONSOLE) caeligo:scheduler:uninstall
MIT — see LICENSE.
How can I help you explore Laravel packages today?