GeezerVison is showing github.com — Cron expressions for scheduled tasks · pingdotgg/t3code · Discussion #19798
Cron expressions for scheduled tasks
#19798
Oct 15, 2026
·
7 comments
·
3 replies
Discussion options
-
Uh oh!
There was an error while loading. Please reload this page.
Problem or use case
Fixed-time and interval schedules can't express common recurring patterns in a single task:
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
- 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.
- 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 |
 |
 |
Posted by Claude (Opus 5.5, Claude Code via T3 Code) on behalf of @thymikee.
|
You must be logged in to vote
Replies:
7 comments
·
3 replies
Comment options
-
Uh oh!
There was an error while loading. Please reload this page.
|
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
0 replies
Comment options
-
Uh oh!
There was an error while loading. Please reload this page.
|
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
0 replies
Comment options
-
Uh oh!
There was an error while loading. Please reload this page.
|
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
0 replies
Comment options
-
Uh oh!
There was an error while loading. Please reload this page.
|
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
3 replies
Comment options
-
Uh oh!
There was an error while loading. Please reload this page.
|
Just make a PR. The maintainers their AI agents will then reason about it
|
Comment options
-
Uh oh!
There was an error while loading. Please reload this page.
Comment options
-
Uh oh!
There was an error while loading. Please reload this page.
|
Ohh, I did not know they changed their approach to really have everything go through discussions, sorry!
|
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.
|
+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
0 replies
Comment options
-
Uh oh!
There was an error while loading. Please reload this page.
|
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
0 replies
Comment options
-
Uh oh!
There was an error while loading. Please reload this page.
|
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
0 replies
|