Skip to content

feat: configurable check-in margin and max runtime for scheduled task monitors - #43

Merged
shyim merged 2 commits into
FriendsOfShopware:mainfrom
stefanpoensgen:feat/scheduled-task-checkin-margin
Sep 3, 2026
Merged

shyim merged 2 commits into
FriendsOfShopware:mainfrom
stefanpoensgen:feat/scheduled-task-checkin-margin

Conversation

@stefanpoensgen

Copy link
Copy Markdown
Member

Fixes #19

ScheduledTaskSubscriber upserts monitors with only a schedule, so Sentry expects the check-in exactly at the scheduled minute. The task runner fires a few seconds after that minute, and Sentry reports the run as missed. In our project this produced about one false "Cron failure" issue per day for an hourly task that ran fine every time.

This adds two optional settings that are passed through to MonitorConfig:

frosh_sentry:
    report_scheduled_tasks: true
    scheduled_tasks:
        checkin_margin: 5
        max_runtime: 30

Both default to null, so existing setups keep Sentry's monitor defaults.

https://claude.ai/code/session_01G2xLjqD8vZ7Ys3inHx4ax5

… monitors

Monitors are upserted with only a schedule, so Sentry expects the check-in
exactly at the scheduled minute. The task runner fires a few seconds later
and the run is reported as missed (FriendsOfShopware#19).

Claude-Session: https://claude.ai/code/session_01G2xLjqD8vZ7Ys3inHx4ax5
@stefanpoensgen

Copy link
Copy Markdown
Member Author

The failing phpstan job is the pre-existing failure on main (PHPStan 1.x vs. the symfony/config generics); #44 fixes it. Happy to rebase once that is in.

@shyim
shyim merged commit a673eec into FriendsOfShopware:main Sep 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scheduled Tasks Monitor triggering sporadically

2 participants