From 05225904f1180b36b4ffdc492cd330462a062e7b Mon Sep 17 00:00:00 2001 From: Dan Fuller Date: Fri, 16 Oct 2026 17:51:37 -0700 Subject: [PATCH 1/2] docs(crons): Add Huey setup for Python Co-Authored-By: Claude --- platform-includes/crons/setup/python.mdx | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/platform-includes/crons/setup/python.mdx b/platform-includes/crons/setup/python.mdx index 41524eaab2234..d5c6f87e06ca2 100644 --- a/platform-includes/crons/setup/python.mdx +++ b/platform-includes/crons/setup/python.mdx @@ -39,6 +39,42 @@ class WorkerSettings: The monitor slug is the cron job's `name`, without arq's `cron:` prefix, so the example above reports to `send_report`. Sentry creates the monitor from the job's `month`, `day`, `weekday`, `hour`, and `minute` in the worker's `timezone`. For schedules that can't be expressed in the Crons schedule format (for example, a job that runs every 10 seconds), jobs that set both `day` and `weekday`, and time zones with a fixed offset that isn't a whole number of hours, the SDK sends check-ins without a monitor config, and you need to create the monitor in Sentry with the same slug. +### Huey + + + +Crons monitoring for Huey ships in the next release of `sentry-sdk`. + + + +If you're using [Huey](/platforms/python/integrations/huey/), set `monitor_periodic_tasks=True` to capture check-ins for your periodic tasks: + +```python +import sentry_sdk +from sentry_sdk.integrations.huey import HueyIntegration + +sentry_sdk.init( + dsn="___PUBLIC_DSN___", + integrations=[ + HueyIntegration( + monitor_periodic_tasks=True, + # optional: regular expressions for periodic tasks to skip + exclude_periodic_tasks=["cleanup"], + ), + ], +) +``` + +```python +from huey import crontab + +@huey.periodic_task(crontab(minute="0", hour="9")) +def send_report(): + ... +``` + +The monitor slug is the task's name, which defaults to the function name. Sentry creates the monitor from the task's `crontab()` schedule in UTC. For periodic tasks with a custom schedule function, crontabs that set both `day` and `day_of_week`, and Huey instances created with `utc=False`, the SDK sends check-ins without a monitor config, and you need to create the monitor in Sentry with the same slug. + ## Job Monitoring Use the Python SDK to monitor and notify you if your periodic task is missed (or doesn't start when expected), if it fails due to a problem in the runtime (such as an error), or if it fails by exceeding its maximum runtime. From ad3449ed72642b34ea1fdc74b55475c39bb380bb Mon Sep 17 00:00:00 2001 From: Dan Fuller Date: Tue, 20 Oct 2026 15:22:46 -0700 Subject: [PATCH 2/2] docs(crons): Say unsupported Huey schedules aren't monitored Co-Authored-By: Claude --- platform-includes/crons/setup/python.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/crons/setup/python.mdx b/platform-includes/crons/setup/python.mdx index 079d5725bd782..431108b6d1e88 100644 --- a/platform-includes/crons/setup/python.mdx +++ b/platform-includes/crons/setup/python.mdx @@ -73,7 +73,7 @@ def send_report(): ... ``` -The monitor slug is the task's name, which defaults to the function name. Sentry creates the monitor from the task's `crontab()` schedule in UTC. For periodic tasks with a custom schedule function, crontabs that set both `day` and `day_of_week`, and Huey instances created with `utc=False`, the SDK sends check-ins without a monitor config, and you need to create the monitor in Sentry with the same slug. +The monitor slug is the task's name, which defaults to the function name. Sentry creates the monitor from the task's `crontab()` schedule in UTC. Periodic tasks aren't monitored when they use a custom schedule function, when their crontab sets both `day` and `day_of_week`, or when the Huey instance is created with `utc=False`. ## Job Monitoring