GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Cron expressions for scheduled tasks · pingdotgg/t3code · Discussion #19798

Cron expressions for scheduled tasks #19798

thymikee started this conversation in Ideas
Cron expressions for scheduled tasks #19798
@thymikee thymikee
Oct 15, 2026 · 7 comments · 3 replies
Return to top
Discussion options
  • Uh oh!

    There was an error while loading. Please reload this page.

thymikee
Oct 15, 2026

Problem or use case

Fixed-time and interval schedules can't express common recurring patterns in a single task:

  • Several clock times a day: [Feature]: Add model options and custom recurrence to Scheduled Tasks #15565 asks for 09:00 and 19:00, and a commenter there created four identical tasks for 00:00, 06:00, 12:00 and 18:00.
  • Monthly runs: Monthly option for fixed-time scheduled tasks #19009.
  • Working-hours patterns, such as hourly from 08:00 to 20:00 plus two overnight runs. In Claude Code I schedule this as 17 0,4,8-20 * * *.

Today these need one task per time, all sharing a prompt, or an interval that drifts away from the clock times.

Proposed solution

  • A Custom schedule that takes one standard five-field cron expression (minute, hour, day of month, month, weekday). It is evaluated in the environment's time zone, like fixed-time tasks, and validated on save.
  • Agents can create and edit it through schedule_task and update_scheduled_task with { "type": "cron", "expression": "..." }.
  • Optional: after saving, the thread-naming model writes a plain-language label for the task list, such as "Hourly at :17 from 08:17 to 20:17, plus 00:17 and 04:17". Until it arrives, or if generation fails, the list shows the expression.

Smallest useful scope

The cron schedule type, its validation and next-run calculation, the Custom option in the web and mobile editors, and the MCP schema. Effect already ships effect/Cron, so this needs no new dependency. Existing schedules are unchanged. The generated label can be split out or dropped.

How a task behaves when its previous run is still busy is a separate problem, tracked in #16818. It is not part of this proposal.

Questions

  1. Is cron the shape you want? The alternative is to extend fixed-time schedules separately: a list of times (suggested in [Feature]: Add model options and custom recurrence to Scheduled Tasks #15565) and a monthly option (Monthly option for fixed-time scheduled tasks #19009). Cron covers both, plus ranges and steps.
  2. Do you want the generated label, or should the list show the raw expression only?

Prior work

I have a working implementation in #19381, which was closed for missing approval. If you approve a direction, I'll cut it down to the approved scope. I won't ask for reconsideration until then.

Before After
Before: New task dialog After: New task dialog with Custom schedule
Task list with a generated cron label

Posted by Claude (Opus 5.5, Claude Code via T3 Code) on behalf of @thymikee.

You must be logged in to vote
All reactions

Replies: 7 comments · 3 replies

Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

manvankaliber
Oct 17, 2026

Codex migration use case: I migrated an hourly automation configured to run at minute :10 of each hour. An interval schedule preserves the one-hour cadence but anchors it to task creation time, so creating it at 09:37 shifts runs to 10:37, 11:37, and so on. A cron expression such as 10 * * * * preserves the intended clock alignment and avoids drifting away from reporting windows and other hourly work.

You must be logged in to vote
All reactions
  • 👍 2
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

uwe-schwarz
Oct 23, 2026

I would propose a custom field with cron and rrule (https://datatracker.ietf.org/doc/html/rfc5545). This gives the maximum flexibility and the agents can fill those fields very easily. Also cron/rrule can be distinguished very easily from another.

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

nacholibre
Oct 27, 2026

For the monthly case listed above (#19009), there is now a PR that works without cron: #26001 adds days of the month (1–31) and an optional set of months to the existing At a time schedule, such as the 5th of January, April, July and October. It doesn't cover several times a day or hour ranges, so it doesn't replace this proposal. #25479 also adds a single monthly date.

Written with Claude Opus 5.5 (claude-opus-5-5) in Claude Code, running inside T3 Code.

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

NicL9923
Nov 8, 2026

I'd like to contribute this. Would a maintainer approve this scope?

Use case. I want a task every 30 minutes during business hours on weekdays. Intervals run around the clock and count from when the task was saved. Fixed-time tasks take one time each, so today this needs about 16 tasks with the same prompt. The working-hours case at the top of this discussion and #26121 are the same problem.

Proposed scope:

  • A new schedule type, { type: "cron", expression }, taking a standard five-field expression: minute, hour, day of month, month, weekday. It runs in the environment's local time zone, like fixed-time tasks.
  • It uses effect/Cron, so there's no new dependency. Six-field expressions are refused, so nothing runs every second. Expressions that never match a real date, such as Feb 30, are refused with the reason.
  • A run missed while the environment was offline is skipped, the same as fixed-time tasks.
  • Servers advertise a cronSchedules capability, and web, desktop, and mobile offer Cron only where it's advertised, the same pattern as one-time schedules. Older clients drop cron tasks from the list without breaking it.
  • The schedule_task MCP tool accepts {type:'cron',expression}.
  • Not included: RRULE, a plain-language description of the expression, or a client-side preview of upcoming runs. Clients don't know the environment's time zone, so a preview would be wrong whenever the client is in a different zone.

The implementation, with tests, docs, and web screenshots, is in #32964. I'm happy to narrow or reshape it.

Written with Claude Opus 5.5 (claude-opus-5-5) in Claude Code, running inside T3 Code.

You must be logged in to vote
All reactions
3 replies
@manvankaliber
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

manvankaliber Nov 8, 2026

Just make a PR. The maintainers their AI agents will then reason about it

All reactions
@uwe-schwarz
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

uwe-schwarz Nov 8, 2026

That's not helping, we need the approval first: #24240 (comment)

All reactions
@manvankaliber
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

manvankaliber Nov 9, 2026

Ohh, I did not know they changed their approach to really have everything go through discussions, sorry!

All reactions
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

  • Uh oh!

    There was an error while loading. Please reload this page.

TreyDong
Nov 10, 2026

+1 from real usage. T3's scheduler today only has interval, fixed_time, once and webhook, which can't express standard recurring patterns in one task:

  • Weekday-only clock-time runs (e.g. hourly 08:00–20:00 on workdays) need one fixed_time task per slot, or an interval that ticks around the clock and burns a full agent turn off-hours just to decide to skip.

A five-field cron type: "cron" evaluated in the environment's timezone, creatable and editable through schedule_task, would cover these cases (plus the monthly gap in #19009) with one primitive. The smallest scope proposed here is enough; the generated label can come later.


Posted via T3 Code (Claude) on behalf of @TreyDong.

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

NicL9923
Nov 25, 2026

Quick bump on this — still running into this gap regularly for weekday + business-hours schedules. Would love to see cron support (or an active time/weekday window as in #26121) land natively so these don't have to be split into many duplicate fixed-time tasks or burn off-hours turns.

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

fjrdomingues
Nov 27, 2026

A case for cron, based on who actually creates scheduled tasks: in my setup an agent writes almost every schedule through schedule_task. I rarely do it in the editor. Agents already know five-field cron and get it right. Claude Code's own scheduler uses it too, so the same expression works in both tools.

My two tasks are 10-minute intervals that only matter during working hours: */10 9-18 * * 1-5 and */10 8-22 * * *. Today each off-hours tick starts a full agent turn (around 85k input tokens, mostly cached) just to read a "skip outside hours" guard. That is about 1,000 wasted turns a week. Splitting them into fixed-time tasks would mean 150 tasks.

For agent-created tasks a narrow version would be enough: the cron type in the contract, the server and schedule_task, with editors showing the raw expression and the next run.

#30697 (a window on interval schedules) would also cover my case, and the two don't conflict. A window is friendlier in the editor. Cron covers the rest: clock alignment, several times a day, monthly runs.

Written with Claude Opus 5.5 (claude-opus-5-5) in Claude Code, running inside T3 Code.

You must be logged in to vote
All reactions
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
💡
Ideas
Labels
None yet
7 participants
@thymikee @nacholibre @uwe-schwarz @manvankaliber @TreyDong @fjrdomingues @NicL9923
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.