janmikes / symfony-console-sentry-cron-monitoring
Implementation of Sentry cron monitoring for symfony/console commands
dev-main
2023-09-16 08:39 UTC
Requires
- php: ^8.1
- sentry/sentry: ^3.0
- symfony/console: ^6.0
- symfony/event-dispatcher: ^6.0
This package is auto-updated.
Last update: 2024-10-16 11:15:22 UTC
README
- Install package -
composer require janmikes/symfony-console-sentry-cron-monitoring
- Register
Janmikes\SymfonyConsoleSentryCronMonitoring\MonitoringConsoleSubscriber
service to your application (must be tagged as event subscriber) - Add
Monitor
attributes to your console commands - Profit!
Minimal
#[Monitor('0 */4 * * *', Environment::Production)] class MySuperCoolCommand
Full
#[Monitor( cronExpression: '0 */4 * * *', environment: Environment::Production, checkinMargin: 10, maxRuntime: 60, timezone: 'Europe/Prague', arguments: ['some-arg', 'some-another-arg'], )] class MySuperCoolCommand