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 — Monthly option for fixed-time scheduled tasks · pingdotgg/t3code · Discussion #19009

Monthly option for fixed-time scheduled tasks #19009

oskarsonc started this conversation in Ideas
Monthly option for fixed-time scheduled tasks #19009
@oskarsonc oskarsonc
Oct 13, 2026 · 4 comments · 2 replies
Return to top
Discussion options
  • Uh oh!

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

oskarsonc
Oct 13, 2026

Problem or use case

Some recurring work runs once a month, such as a monthly report, a dependency audit, a billing review, or cleanup of old branches. A scheduled task cannot express that today.

  • fixed_time takes a time of day and optional weekdays. It can run daily or weekly, but not monthly.
  • A 30-day interval drifts against the calendar. It counts from when the task was created or last updated, so it cannot run on "the 1st of each month at 09:00".

The workaround is a daily task whose prompt says "if today is not the 1st, stop". That starts an agent turn every day, and most of those turns do nothing.

The Codex app has a monthly option for its scheduled tasks.

Proposed solution

Add an optional day-of-month list to fixed_time instead of a new schedule type:

{ type: "fixed_time", timeOfDay: "09:00", monthDays: [1] }       // 1st of every month
{ type: "fixed_time", timeOfDay: "09:00", monthDays: [1, 15] }   // 1st and 15th
  • monthDays is an optional array of integers from 1 to 31. Without it, the schedule behaves as it does now.
  • The schema rejects a schedule that sets both monthDays and weekdays.
  • If a month has no such day, the task runs on the last day of that month. For example, 31 runs on April 30, so 31 also means "end of month".
  • Existing tasks keep working because the field is optional.

Files that would change:

  • packages/contracts/src/scheduledTask.ts gets the new field and the check that rejects it together with weekdays.
  • In apps/server/src/scheduledTasks/Schedule.ts, nextScheduledRunAt now looks at most 8 days ahead. It must look up to a month ahead. isSameSchedule and describeSchedule must also read the new field.
  • The web and mobile schedule editors get a "Monthly" choice with a day picker.
  • The schedule_task and update_scheduled_task MCP tool schemas and the orchestration instructions document the field.
  • Schedule.test.ts and ScheduledTaskService.schedule.test.ts get cases for short months, leap years, and DST changes.

One question for maintainers. The scheduler skips a fixed-time run that is more than 10 minutes late. If a laptop is asleep at 09:00 on the 1st, a monthly task loses that month's run. Should a monthly run fire once when the server comes back, or keep the current skip behavior?

Why this would help

The change adds one optional field to the existing fixed_time schedule and covers monthly work without the daily date-check workaround and its extra agent turns.

I can implement this if maintainers approve the direction and scope.

You must be logged in to vote
All reactions

Replies: 4 comments · 2 replies

Comment options
  • Uh oh!

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

itsjeremyjohnson
Oct 13, 2026

+1, and here is a concrete use case.

We run a fresh-thread scheduled task that pulls each client's Search Console page-indexing report on the 3rd of every month. Indexing data needs a few days after month end to settle, so the run has to land on a fixed day of the month.

fixed_time only covers daily and weekly schedules, and a 30-day interval drifts away from the calendar. Our workaround is an external cron (0 5 3 * *) that POSTs to the task's webhook trigger. It works, but it means running a second scheduler and keeping the webhook URL on disk.

monthDays: [3] on fixed_time would cover our case. We would also use a "last day of month" option for month-end reporting if one existed.

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 20, 2026

I'd like to contribute this, and I have a working implementation to show before opening a PR.

Proposal: extend fixed_time with optional monthDays (1–31) and months (1–12) instead of adding cron (#19798 covers that separately).

  • Days of the week or days of the month, not both; months combines with either.
  • A day a month doesn't have (the 31st, 29 Feb) runs on that month's last day, once.
  • Stored in the existing schedule JSON, so there's no migration and existing tasks are unchanged.
  • Web and mobile editors get a 1–31 grid, an "Only in some months" switch, a check on each chosen item, and a one-line summary ("At 09:00 on the 5th of Jan, Apr, Jul and Oct"). MCP schedule_task documents the fields.

My use case has the same shape as the one above: monthly reports on the 4th and 6th, and a quarterly one on the 5th of Jan/Apr/Jul/Oct, which I currently run from systemd timers.

Branch: main...nacholibre:t3code:feat/scheduled-task-month-days
Tests cover month lengths, the 31st, 29 Feb, the year boundary and DST.

Before (web) After (web)
Before (mobile) After (mobile) After: the 31st

Is this direction and scope OK for a PR?

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

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

oskarsonc Oct 20, 2026
Author

Nice, yes I think this is good.

All reactions
@nacholibre
Comment options
  • Uh oh!

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

nacholibre Oct 27, 2026

The PR is open: #26001.

Since the proposal above, it's rebased on current main and has one addition: servers now advertise a scheduledTaskMonthDays capability, and the editors only offer days of the month on servers that advertise it. An older server would drop the fields and run the task every day. The PR has before and after screenshots for web and Android, in light and dark mode.

#25479 (opened Oct 26) solves the same problem differently: one date a month, and months without that date are skipped. I'm happy to go with whichever direction maintainers prefer.

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

All reactions
Comment options
  • Uh oh!

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

hy26v
Nov 17, 2026

+1. In addition to monthly, I need "every N weeks" (for example every 2 weeks on Monday at 09:00). Weekdays alone cannot express that, and a 14-day interval drifts from the calendar.

Also, the interval editor takes only minutes. Units of hours, days and weeks would make longer intervals easier to set and to read. Cron (#19798) would cover monthly, but not "every 2 weeks", so a week-step field on fixed_time (for example everyWeeks: 2 plus a start date) would still be useful.

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.

lordydord
Nov 18, 2026

+1, with a concrete case from moving a set of recurring jobs over from a cron-based scheduler.

Two of the jobs are monthly:

  • one runs on the 18th of every month (40 4 18 * *)
  • one must run on the last day of the month (a month-end invoice). Even in cron this needs 28-31 plus a date check inside the job.

Today both are daily fixed_time tasks whose prompt checks the date and stops, so each starts about 30 agent sessions a month to do one real run.

What would cover it:

  1. monthDays on fixed_time, as proposed above (closed PR feat(scheduled-tasks): run timed tasks on days of the month and in chosen months #26001 had it).
  2. An explicit Last day of the month choice, for example monthDays: ["last"] or -1, rather than relying on 31 falling back to the month's last day. In the editor "31" reads as "the 31st", and an explicit option leaves room for "last weekday of the month" later.
  3. Optionally a per-task time zone. The month-end job has to land in a UK afternoon while the machine runs on America/Mexico_City time, so timeOfDay has to be converted by hand and drifts for a few weeks a year when the two DST calendars differ.

The other part of this migration was several times a day (one job at 10:00 and 11:00, another at 11:00, 12:00 and 13:00), which #19798 or #15565 would turn from two or three identical tasks back into one.

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
5 participants
@oskarsonc @nacholibre @hy26v @itsjeremyjohnson @lordydord
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.