claude-code - 💡(How to fix) Fix [FEATURE] Allow disabling jitter delay on recurring scheduled tasks

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

Currently, all recurring scheduled tasks have a hardcoded deterministic jitter of up to ~6 minutes added at dispatch time to balance server load. There is no parameter to opt out.

RAW_BUFFERClick to expand / collapse

Currently, all recurring scheduled tasks have a hardcoded deterministic jitter of up to ~6 minutes added at dispatch time to balance server load. There is no parameter to opt out.

For time-sensitive workflows (e.g., email triage sessions that should fire at exactly 9:00 AM, 1:00 PM, and 6:00 PM), even a few minutes of drift matters — especially when coordinating with a user's daily routine.

Request: Add an optional disableJitter: true parameter to create_scheduled_task and update_scheduled_task that fires the task at the exact cron time with no delay.

extent analysis

TL;DR

Adding an optional disableJitter parameter to scheduled task creation and update APIs can help mitigate timing issues for time-sensitive workflows.

Guidance

  • Introduce a new optional parameter disableJitter with a default value of false to the create_scheduled_task and update_scheduled_task APIs.
  • When disableJitter is set to true, the scheduled task should be executed at the exact specified time without any added jitter.
  • Consider adding validation to ensure that disableJitter can only be set to true for tasks with a cron schedule, as it may not be applicable to other types of schedules.
  • Document the new parameter and its behavior in the API documentation to inform users about this new feature.

Example

# Example of updated create_scheduled_task API
def create_scheduled_task(cron_schedule, task_data, disable_jitter=False):
    if disable_jitter:
        # Execute task at exact cron time
        schedule_task_at_exact_time(cron_schedule, task_data)
    else:
        # Add jitter to the schedule
        schedule_task_with_jitter(cron_schedule, task_data)

# Example of updated update_scheduled_task API
def update_scheduled_task(task_id, cron_schedule, task_data, disable_jitter=False):
    if disable_jitter:
        # Update task to execute at exact cron time
        update_task_schedule(task_id, cron_schedule, task_data, exact_time=True)
    else:
        # Update task with jitter
        update_task_schedule(task_id, cron_schedule, task_data, exact_time=False)

Notes

The introduction of the disableJitter parameter may require changes to the underlying scheduling system to accommodate exact timing. Additionally, the parameter's behavior should be thoroughly tested to ensure it works as expected.

Recommendation

Apply workaround by adding the disableJitter parameter to the scheduled task APIs, as it provides a flexible solution for time-sensitive workflows without requiring significant changes to the existing scheduling system.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [FEATURE] Allow disabling jitter delay on recurring scheduled tasks