Scheduler for unattended Codex tasks with Telegram notifications
Project description
Yotei
Yotei is a small scheduler for unattended Codex tasks.
Install
uv tool install -U yotei-runner
Yotei expects the codex CLI to already be installed and authenticated on the
machine where scheduled runs execute. The scheduler invokes the configured Codex
binary directly and does not manage Codex login state for you.
The published package name is yotei-runner. The installed command remains
yotei.
Quick Start
Initialize a user-level config file:
yotei config init
Schedule a task in the current directory:
yotei schedule \
--task repo-review \
--when "weekdays 09:30" \
--prompt "Review the latest repository changes."
Run one scheduler pass:
yotei run --once
Inspect current tasks:
yotei status
Config Discovery And Paths
Config discovery order is:
--config <path>YOTEI_CONFIGSCHEDULED_AGENT_RUNNER_CONFIG.automation/yotei/config.tomlin the current directory or a parent.automation/scheduled-agent-runner/config.tomlin the current directory or a parent${XDG_CONFIG_HOME:-~/.config}/yotei/config.toml
By default, yotei config init writes:
- config:
${XDG_CONFIG_HOME:-~/.config}/yotei/config.toml - state DB:
${XDG_STATE_HOME:-~/.local/state}/yotei/state.sqlite3 - logs:
${XDG_STATE_HOME:-~/.local/state}/yotei/logs/
Yotei uses the same XDG-style defaults on Linux and macOS when the XDG variables are unset. That keeps installs portable and predictable across machines.
Workspace Semantics
Each task stores its own absolute workspace_root.
yotei scheduledefaults--workspaceto the current directoryyotei schedule --workspace <path>stores an explicit workspaceyotei edit --workspace <path>repairs or changes a task workspace lateryotei statusshows each task's stored workspaceyotei runexecutes Codex with that persisted workspace ascwd
If a stored workspace no longer exists on a machine, Yotei fails that run
cleanly and tells you to repair it with yotei edit --workspace.
Scheduler Ownership
Yotei's first portable release expects one active scheduler process per state
database. Do not run multiple long-lived yotei run processes against the same
state.sqlite3; the current baseline documents this ownership contract instead
of using cross-platform lock files or database leases.
Use yotei run for the normal long-running scheduler. It polls for due tasks,
runs them from each task's persisted workspace, writes run logs, and keeps
polling until interrupted.
Use yotei run --once for tests, smoke checks, service hooks, or manual
maintenance. It performs one scheduler pass, including due tasks and at most one
queued run, then exits. The same single-runner policy applies while that pass is
running.
Telegram
Telegram notifications are optional. Set telegram.bot_token and
telegram.chat_id, then keep notifications.send_on_start, send_on_success,
and send_on_failure enabled only for the events you want.
Use a literal token or an environment reference such as:
[telegram]
bot_token = "env:TG_BOT_TOKEN"
chat_id = "env:TG_CHAT_ID"
yotei schedule --chat-id <id> overrides telegram.chat_id for one task.
Notification delivery failures do not fail Codex runs. Yotei records concise notification errors in run metadata and scheduler logs without writing the bot token back into summaries or logs.
Schedule Grammar
yotei schedule --when and yotei edit --when accept these forms:
in <int>m,in <int>h,once in <int>m,once in <int>hevery <int>m,every <int>hdaily H:MM,weekdays H:MM<day-list> H:MM, where days aremon,tue,wed,thu,fri,sat,suncron "<minute> <hour> <day-of-month> <month> <day-of-week>"
Clock times must use 24-hour H:MM or HH:MM form. Cron expressions use five
numeric fields. Supported cron field syntax is *, comma lists, ranges, and
slash steps. Names, ?, L, W, #, wraparound ranges, and advanced cron
semantics are not supported. Day-of-month and day-of-week both have to match.
Backup And Restore
Back up these paths together:
${XDG_CONFIG_HOME:-~/.config}/yotei/config.toml${XDG_STATE_HOME:-~/.local/state}/yotei/state.sqlite3${XDG_STATE_HOME:-~/.local/state}/yotei/logs/
To restore on another machine:
- Install
yotei-runnerand make sure the target machine has a workingcodexCLI. - Restore the config file, state DB, and logs into the same XDG locations or
pass
--configexplicitly. - Run
yotei statusand repair any task whose stored workspace path is no longer valid on the new machine withyotei edit --workspace. - Start the scheduler with
yotei runor test one pass withyotei run --once.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yotei_runner-0.1.2.tar.gz.
File metadata
- Download URL: yotei_runner-0.1.2.tar.gz
- Upload date:
- Size: 32.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d7167091306861d30006ba651c40870abca18047d94110b2a3e63543c2ab37f
|
|
| MD5 |
4c06155475dbac38e2193578f12d1a73
|
|
| BLAKE2b-256 |
0c9c00c5b8da3a6434f0a314cc92b0d7d66312558cb05827eded430d802c3c93
|
Provenance
The following attestation bundles were made for yotei_runner-0.1.2.tar.gz:
Publisher:
publish.yml on massun-onibakuchi/yotei
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yotei_runner-0.1.2.tar.gz -
Subject digest:
1d7167091306861d30006ba651c40870abca18047d94110b2a3e63543c2ab37f - Sigstore transparency entry: 1579233637
- Sigstore integration time:
-
Permalink:
massun-onibakuchi/yotei@50adba2fafc26c7dc21c906b94cc10fc1a991784 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/massun-onibakuchi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@50adba2fafc26c7dc21c906b94cc10fc1a991784 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file yotei_runner-0.1.2-py3-none-any.whl.
File metadata
- Download URL: yotei_runner-0.1.2-py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d05d64a97d4acc46927f9ac03506710eef2d770e9bad92da45d8a3f6bb7d56c
|
|
| MD5 |
e0ba66f138fb702288eab6d2132d79ba
|
|
| BLAKE2b-256 |
90430c88e6008cbb5db0c024c8329c8216e450a70a3056dc2e57a42383a0e88b
|
Provenance
The following attestation bundles were made for yotei_runner-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on massun-onibakuchi/yotei
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yotei_runner-0.1.2-py3-none-any.whl -
Subject digest:
3d05d64a97d4acc46927f9ac03506710eef2d770e9bad92da45d8a3f6bb7d56c - Sigstore transparency entry: 1579233814
- Sigstore integration time:
-
Permalink:
massun-onibakuchi/yotei@50adba2fafc26c7dc21c906b94cc10fc1a991784 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/massun-onibakuchi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@50adba2fafc26c7dc21c906b94cc10fc1a991784 -
Trigger Event:
workflow_dispatch
-
Statement type: