From 4b5520c31ce567a551f05ebeca6599e7c57dbd3d Mon Sep 17 00:00:00 2001 From: wintan1418 Date: Thu, 30 Jul 2026 13:29:13 +0100 Subject: [PATCH] Document how to update dynamic recurring tasks The scheduler only detects dynamic tasks being created and deleted, so updating a SolidQueue::RecurringTask record in place isn't picked up until a restart. This is by design: the documented way to update a task is to unschedule it and schedule it again. This wasn't stated in the README and has caused some confusion (#738, and the closed #739 and #774), so spell it out in the dynamic tasks section. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a0b9a2ea..b5d3d9d6 100644 --- a/README.md +++ b/README.md @@ -830,6 +830,8 @@ SolidQueue.unschedule_recurring_task("my_dynamic_task") Only dynamic tasks can be unscheduled at runtime. Attempting to unschedule a static task (defined in `config/recurring.yml`) will raise an `ActiveRecord::RecordNotFound` error. +To update an existing dynamic task, unschedule it and then schedule it again with the new options. A running scheduler only detects dynamic tasks being created and deleted, so updating a `SolidQueue::RecurringTask` record in place (for example, changing its `schedule` with `update!`) won't be picked up until the scheduler restarts. + Tasks scheduled like this persist between Solid Queue's restarts and won't stop running until you manually unschedule them. ## Inspiration