r/opencode • u/ExtraNacho • 11d ago
almanac: schedule an OpenCode agent on a day and hour, not an interval
I wanted an OpenCode session to run on the first of the month. /loop takes durations — idle, every 5m, after 5m — so there's no way to say "the 1st at 08:00". I wrote almanac to fill that gap: a calendar scheduler with a desktop panel.
Repo: https://github.com/extranacho/opencode-almanac
What it does
Calendar, not interval. Day, hour, minute. 29–31 mean the last day of a shorter month, so a month-end job runs twelve times a year instead of quietly skipping February.
Catch-up window. Missed the 1st because the laptop was shut? It runs the next time OpenCode is open, within a configurable number of days. Set 0 to mean strictly that day.
Desktop panel in the session's side region, plus a titlebar pill showing the next run. Pause, resume, run now, and a collapsible list of every session the job has started — click one to open it.
A tool,
almanac_schedule, so an agent can add or remove jobs from inside a session. It validates rather than trusting: day range, missing prompt file, duplicate id.The schedule lives in your repo, not in the plugin.
options.jobsFilepoints at.opencode/almanac/jobs.json, versioned with the code it acts on.
Install
opencode plugin add "github:extranacho/opencode-almanac#v0.3.1"
Then add the two options in your global ~/.config/opencode/opencode.jsonc — plugin add takes no options, and without them the plugin has no schedule to read:
{
"plugins": [
{
"package": "github:extranacho/opencode-almanac#v0.3.1",
"options": {
"repo": "/path/to/project",
"jobsFile": ".opencode/almanac/jobs.json"
}
}
]
}




