Skip to main content
skill CX Codex

symfony-scheduler — Claude Code skill: what it does, how to install

Configures recurring tasks with the Symfony Scheduler component without system crontab entries. Useful for scheduled report generation, database cleanups, and Messenger syncs.

MIT ★ 234 updated 2026-10-05

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dev-toolings/superpowers-symfony --skill symfony-scheduler -a claude-code
Open on GitHub

What symfony-scheduler does

The skill guides Claude Code when building recurring workloads on top of symfony/scheduler, native to Symfony 7.x. The agent generates ScheduleProviderInterface classes marked with #[AsSchedule], sets up every() intervals or cron() expressions with explicit timezones, and connects them to #[AsMessageHandler] handlers.

Execution guards are part of the output. The skill attaches stateful() and lock() calls to the schedule and prepares the messenger:consume scheduler_default command for Supervisor. Running multiple worker processes without a lock causes duplicate runs. Handlers also need to remain idempotent in case a task repeats.

What it helps with

  • run scheduled tasks without configuring system crontab entries
  • split background jobs across separate schedules using #[AsSchedule]
  • block duplicate executions of heavy jobs with locks and state tracking
  • write Supervisor consumer configurations with --time-limit recycling

Example prompts for the agent

  • Configure a Symfony Scheduler provider to clean old logs every six hours.
  • Set up a scheduled report job with a lock factory to prevent overlapping executions.
  • Generate a Supervisor worker config for scheduler_default with a time limit flag.

How to install symfony-scheduler

1Skills CLI (Vercel)

npx skills add dev-toolings/superpowers-symfony --skill symfony-scheduler -a claude-code

2Manually: put the files in place

~/.claude/skills/symfony-scheduler/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/symfony-scheduler/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about symfony-scheduler

How do I install symfony-scheduler in Claude Code?

Run npx skills add dev-toolings/superpowers-symfony --skill symfony-scheduler -a claude-code in your terminal.

What does symfony-scheduler do?

It guides Claude Code in defining recurring PHP jobs using Symfony Scheduler, setting up every or cron triggers, and routing messages through Symfony Messenger.

How does it prevent overlapping task executions?

It applies a lock via lock() on the Schedule instance and specifies numprocs=1 for the consumer worker in Supervisor.

Source text

SKILL.md · MIT
---
name: symfony-scheduler
description: Schedule recurring tasks with the Symfony Scheduler component (native since 7.x); define schedules, triggers, and integrate with Messenger
capabilities: [read, search, edit, shell]
tags: [messenger]
# projected by `bun run build` — do not edit by hand
allowed-tools:
  - Read
  - Glob
  - Grep
  - Write
  - Edit
  - Bash
---

# Symfony Scheduler (Symfony)

## Use when
- Running recurring work (reports, cleanups, syncs) without system cron entries.
- Choosing between `RecurringMessage::every()`, `RecurringMessage::cron()`, and a custom `TriggerInterface`.
- Splitting jobs into several named schedules with `#[AsSchedule]`.
- Preventing overlap or lost runs of heavy scheduled tasks.

## Default workflow
1. Install `symfony/scheduler`, then write the message and its `#[AsMessageHandler]` handler.
2. Create a `#[AsSchedule('default')]` class implementing `ScheduleProviderInterface` and add `RecurringMessage` entries.
3. Pick the trigger: `every('5 minutes')` or `cron('0 */6 * * *')`, with an explicit timezone for cron.
4. Add `stateful($cache)` and `lock($lockFactory->createLock('scheduler'))` on the `Schedule` for heavy tasks.
5. Run it with `messenger:consume scheduler_default` under Supervisor, one process per schedule.
6. Log with `PreRunEvent` and `PostRunEvent`, and test the provider through `getRecurringMessages()` and `getNextRunDate()`.

## Guardrails
- Run a single consumer per schedule (`numprocs=1`) and add a lock, or the same task fires twice.
- Be explicit about timezones on every cron trigger.
- Scheduled handlers must be idempotent, since a run can be repeated.
- Use `--time-limit` with Supervisor `autorestart` so the long-lived worker recycles itself.

## Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.

## Output contract
- The schedule provider(s) with their triggers and timezone.
- The worker command and the Supervisor entry.
- The overlap policy (stateful, lock) and the monitoring hooks.

## References
- `reference.md`

© dev-toolings · MIT · dev-toolings/superpowers-symfony

Similar skills

All skills for Backend and APIs →

From the same set51

The whole set →
test-doubles-mocking test-doubles-mocking — a skill for creating test doubles with PHPUnit mocks in Symfony, used to replace slow or external dependencies, verify method calls, and write simplified repository fakes in isolated unit tests. CX Codex +1 ★ 234repo stars rate-limiting rate-limiting guides Claude Code through setting up Symfony RateLimiter policies, controller attributes, and 429 responses with Retry-After headers. CX Codex +1 ★ 234repo stars api-platform-tests The api-platform-tests skill guides functional tests for Symfony API Platform resources, including response checks, filters, JSON schemas, and access control. Use it while building or changing API endpoints. CX Codex +1 ★ 234repo stars api-platform-serialization Skill configures API Platform serialization: field groups per operation, IRIs instead of nested objects, computed properties, and normalizer options. CX Codex +1 ★ 234repo stars tdd-with-pest tdd-with-pest guides RED-GREEN-REFACTOR in Symfony projects using Pest v4. Use it to write new tests, reproduce bugs before a fix, or move PHPUnit tests to Pest syntax. CX Codex +1 ★ 234repo stars api-platform-versioning api-platform-versioning keeps API Platform clients alive through renames and removals: deprecation with a sunset date first, parallel versions as the last resort. CX Codex +1 ★ 234repo stars functional-tests functional-tests guides Claude Code in writing functional Symfony tests using WebTestCase, KernelTestCase, loginUser, and DAMA rollback. CX Codex +1 ★ 234repo stars doctrine-migrations Create and review Doctrine migrations, prepare rollbacks, and check pending changes before deployment. Useful when a Symfony app’s entity mapping changes. CX Codex +1 ★ 234repo stars

Project sponsors

Companies that keep this analytics open