You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
crontask needs a way to configure the Sentry cron monitor #44
I need this because my team's cron tasks keep getting erroneous "missed checkins" at random, which correct themselves immediately on the next run. I believe what's happening is that the task is taking just a little bit too long to start up, and increasing the checkin_margin config will make the missed cron warnings go away.
I'm going to submit a PR for this, but I'm not 100% sure how best to make it user-configurable. Perhaps a new key in the CRONTASK settings dict, "CRON_MONITOR_CONFIG": dict. I think I'll go with that to start.
Thank you for reaching out about this. We actually send a monitor config on each check-in since the last version; see ae12a07 by @amureki
However, we only push the schedule and not any margins, owners, and co. Are those overridden for you? If so, this is something I would like to discuss with Sentry.
Hmm, odd. I dunno why my project's venv had an old version of the library installed when I made this issue. Glad to see that MonitorConfigs are now being sent in v1.2, tho.
I see that, among the available settings in MonitorConfig, crontask seems to only send "schedule" and "timezone". It would be nice if crontask looked to the Django settings to optionally add the other config values, and/or if the @cron decorator took them as parameters.
Based on what I'm seeing in my Sentry reports, it looks like the other settings are all being treated as "null", but I don't know how Sentry handles that situation. Does it just not consider checkin_margin at all when determining if a checkin failed?
As for the topic of this issue, specifically, I do think it'd be nice if crontask allowed the user to define those other MonitorConfig values in some way. Perhaps a dictionary in CRONTASK, or as arguments to @cron.
Repository owner locked and limited conversation to collaborators on May 15, 2026
Activity
codingjoe commentedon May 14, 2026
Hi @coredumperror,
Thank you for reaching out about this. We actually send a monitor config on each check-in since the last version; see ae12a07 by @amureki
However, we only push the schedule and not any margins, owners, and co. Are those overridden for you? If so, this is something I would like to discuss with Sentry.
Cheers!
Joe
coredumperror commentedon May 14, 2026
Hmm, odd. I dunno why my project's venv had an old version of the library installed when I made this issue. Glad to see that MonitorConfigs are now being sent in v1.2, tho.
I see that, among the available settings in MonitorConfig, crontask seems to only send "schedule" and "timezone". It would be nice if crontask looked to the Django settings to optionally add the other config values, and/or if the
@crondecorator took them as parameters.Based on what I'm seeing in my Sentry reports, it looks like the other settings are all being treated as "null", but I don't know how Sentry handles that situation. Does it just not consider
checkin_marginat all when determining if a checkin failed?As for the topic of this issue, specifically, I do think it'd be nice if crontask allowed the user to define those other MonitorConfig values in some way. Perhaps a dictionary in
CRONTASK, or as arguments to@cron.