claude-code - 💡(How to fix) Fix [BUG] Cloud scheduled task "weekdays" preset runs Tue–Sat instead of Mon–Fri (off-by-one day-of-week) [1 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#47161Fetched 2026-04-13 05:39:50
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Error Message

Error Messages/Logs

No error — the task completes successfully on the wrong days. The bug is silent.

Root Cause

Likely root cause

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

A cloud scheduled task configured with the "weekdays" preset via the Claude Code web UI (claude.ai/code/scheduled) runs on Tuesday through Saturday instead of the expected Monday through Friday.

Additionally, the session launched by the scheduler receives an incorrect date: the April 11 (Saturday) run's session reports "Today is Friday" — the date is off by one day.

Evidence: Run history

Full run history for the task (excluding MANUAL runs):

Run dateActual dayRan (scheduled)?Day reported inside session
Apr 13Monday:x: Skipped — UI shows "Next run: Tomorrow at 3:00"N/A
Apr 12Sunday:x: (expected)N/A
Apr 11 at 3:25Saturday:white_check_mark: Ran"Friday" ← wrong
Apr 10 at 8:18Friday:white_check_mark: Ran"Friday, April 10, 2026" ← correct
Apr 9 at 8:07Thursday:white_check_mark: Ran(not checked)
Apr 8 at 8:21Wednesday:white_check_mark: Ran(not checked)
Apr 7 at 8:05Tuesday:white_check_mark: Ran(not checked)
Apr 6 at 9:47Monday:x: Only a MANUAL runN/A
Apr 5Sunday:x: (expected)N/A
Apr 4 at 8:22Saturday:white_check_mark: Ran(not checked)

Pattern is clear across two full weeks: scheduled runs fire on Tue, Wed, Thu, Fri, Sat. Monday is consistently skipped. Saturday is consistently included.

Evidence: Date mismatch inside session

When clicking on the April 11 run (session ID: session_01PRdszEvcNzXzxUWMSfHA1s), the session's conversation shows Claude believing "Today is Friday" — but April 11, 2026 is actually a Saturday.

This means the scheduler's internal clock is off by one day. The scheduler:

  1. Evaluates "should I run today?" using yesterday's day-of-week (thinks Saturday is Friday → Friday is a weekday → fires the task)
  2. Passes the wrong date to the session context

This explains the Tue–Sat pattern perfectly: the scheduler thinks Mon=Sun, Tue=Mon, Wed=Tue, ..., Sat=Fri. So "weekdays (Mon–Fri)" becomes Tue–Sat from the user's perspective.

Likely root cause

The scheduler appears to use a date/time value that is off by exactly one day (24 hours behind) when:

  • Evaluating cron expressions to decide whether to fire
  • Injecting the current date into the session context

This could be a timezone conversion bug — for example, if the scheduler converts JST (UTC+9) to UTC for cron evaluation but then subtracts the offset instead of adding it, or uses a date boundary that's 24h behind.

Downstream impact

My task prompt includes day-of-week logic:

  • "If today is Monday: search Gmail for the past 3 days (Fri, Sat, Sun)"
  • "If today is Tuesday–Friday: search Gmail for yesterday only"

Because the scheduler never fires on Monday and reports the wrong day, the Monday catch-up logic in my prompt never executes. Weekend emails are permanently missed.

What Should Happen?

  1. A task set to "weekdays" should run Monday through Friday only
  2. The date injected into the session context should match the actual calendar date

Steps to Reproduce

  1. Go to claude.ai/code/scheduled
  2. Create a new cloud scheduled task
  3. Set the schedule to "Weekdays" at any time
  4. Set the timezone to JST (Asia/Tokyo, UTC+9)
  5. Wait for a full week and check the run history
  6. Observe: task runs Tue–Sat, skips Monday, includes Saturday
  7. Click on a Saturday run and observe that the session reports the day as Friday

Error Messages/Logs

No error — the task completes successfully on the wrong days. The bug is silent.

Claude Model

N/A (infrastructure/scheduler issue, not model issue)

Is this a regression?

Unknown — this is the first time I've monitored a full week of runs.

Platform

Claude Code on the web (claude.ai/code/scheduled)

Operating System

Windows 11 Pro (client-side; issue is server-side in the cloud scheduler)

Additional Information

  • Timezone: Asia/Tokyo (JST, UTC+9) — non-US timezone may be relevant to the bug
  • Plan: Team
  • Session ID for the April 11 (Saturday→"Friday") run: session_01PRdszEvcNzXzxUWMSfHA1s
  • Possibly related to #24466 (Claude miscalculates day-of-week, off by one), which was closed as duplicate without a clear parent issue.

Screenshots

Task configuration and run history

This has been taken on Apr 13, 2026, which indicates skipping Mon. It also shows Sat running and next Tue running. <img width="1917" height="938" alt="Image" src="https://github.com/user-attachments/assets/a01835e6-2732-486f-ab2c-3c21232fb7aa" />

Session showing wrong date (April 11 Saturday run reports "Friday")

<img width="1144" height="598" alt="Image" src="https://github.com/user-attachments/assets/da9801b1-0065-4853-9170-48f818a70c29" />

Full run history

<img width="1911" height="878" alt="Image" src="https://github.com/user-attachments/assets/4771ec19-5621-4c97-9f0d-0522b393b8ae" />

extent analysis

TL;DR

The scheduler's internal clock appears to be off by one day, causing tasks to run on Tuesday through Saturday instead of Monday through Friday, and reporting incorrect dates.

Guidance

  • Verify the timezone settings in the scheduler to ensure it is correctly handling the Asia/Tokyo (JST, UTC+9) timezone.
  • Check the cron expression evaluation logic to see if it is using the correct date and time values.
  • Review the code that injects the current date into the session context to ensure it is using the correct date and time values.
  • Consider testing the scheduler with a different timezone to see if the issue is specific to the JST timezone.

Example

No code snippet is provided as the issue seems to be related to the scheduler's internal logic and timezone handling.

Notes

The issue may be related to a previously closed issue (#24466) which was closed as a duplicate without a clear parent issue. It is unclear if this is a regression or a new issue.

Recommendation

Apply a workaround by manually adjusting the schedule to exclude Saturday and include Monday, until the root cause of the issue is identified and fixed. This will ensure that tasks run on the correct days, but it may not fix the underlying issue with the scheduler's internal clock.

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 [BUG] Cloud scheduled task "weekdays" preset runs Tue–Sat instead of Mon–Fri (off-by-one day-of-week) [1 comments, 2 participants]