symfony-scheduler — скилл для Claude Code: что делает и как установить
Скилл для Claude Code настраивает периодические задачи через Symfony Scheduler без системного cron. Запускает генерацию отчётов, очистку данных и синхронизации через Symfony Messenger.
MIT ★ 234 обновлён 2026-10-05
npx skills add dev-toolings/superpowers-symfony --skill symfony-scheduler -a claude-codeЧто делает symfony-scheduler
Скилл направляет Claude Code при создании расписаний на базе компонента symfony/scheduler, появившегося в Symfony 7.x. Агент готовит классы с атрибутом #[AsSchedule], реализующие ScheduleProviderInterface, настраивает триггеры с интервалами every() или выражениями cron(), а также связывает сообщения с обработчиками #[AsMessageHandler].
В архитектуру закладывается защита от дублирования тяжёлых процессов. Скилл добавляет вызовы stateful() и блокировки через lock(), а также конфигурирует запуск воркера messenger:consume scheduler_default под Supervisor. Без блокировки и с несколькими процессами воркера задача неизбежно выполнится повторно. Для надёжного перезапуска долгоживущих процессов задаётся флаг --time-limit.
Какие задачи решает
- настроить регулярный запуск задач без правок crontab в системе
- разделить фоновые работы по именованным расписаниям с
#[AsSchedule] - предотвратить одновременный повторный запуск тяжёлых фоновых задач
- подготовить конфигурацию воркера под Supervisor с перезапуском по лимиту времени
Примеры запросов агенту
- Настрой расписание очистки старых логов через Symfony Scheduler каждые 6 часов.
- Создай провайдер расписания для отправки отчётов с блокировкой от параллельного запуска.
- Сконфигурируй воркер Supervisor для консьюмера
scheduler_defaultс ограничением времени работы.
Как установить symfony-scheduler
1Через Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill symfony-scheduler -a claude-code2Вручную: положить файлы
~/.claude/skills/symfony-scheduler/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/symfony-scheduler/
1Через Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill symfony-scheduler -a codex2Вручную: положить файлы
.agents/skills/symfony-scheduler/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill symfony-scheduler -a cursor2Вручную: положить файлы
.cursor/skills/symfony-scheduler/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install dev-toolings/superpowers-symfony content/skills/symfony-scheduler2Вручную: положить файлы
.github/skills/symfony-scheduler/SKILL.md1Через Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill symfony-scheduler -a gemini-cli2Командой платформы
gemini skills install https://github.com/dev-toolings/superpowers-symfony --path content/skills/symfony-schedulerВручную: положить файлы
.devin/skills/symfony-scheduler/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о symfony-scheduler
Как установить symfony-scheduler в Claude Code?
Выполните в терминале команду npx skills add dev-toolings/superpowers-symfony --skill symfony-scheduler -a claude-code.
Что делает скилл symfony-scheduler?
Он помогает описывать регулярные задачи на PHP с помощью компонента Symfony Scheduler, настраивать триггеры every или cron и связывать их с обработчиками сообщений Messenger.
Как избежать параллельного выполнения одной и той же задачи?
Для расписания вызывают метод lock() с фабрикой блокировок и настраивают ровно один процесс воркера (numprocs=1) в Supervisor.
Исходный текст
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