Overview
rousseau cron is a subcommand tree that manages scheduled prompts. Jobs live in the cron_jobs table inside sessions.db. A running transport daemon (any of whatsapp, slack, discord, telegram, matrix, signal, sms, imessage, email) picks up the jobs at startup and fires them via the configured provider, delivering the result to the target address.
Source: internal/cli/cron.go. Scheduler: internal/cron/. Storage: internal/state/sqlite/ (CronStore).
Command tree
rousseau cron
├── add Add a scheduled prompt
├── list List every scheduled job
├── remove Delete a scheduled job (alias for `rm` in some places)
├── enable Enable a scheduled job
└── disable Disable a scheduled job
cron add
rousseau cron add \
--name <unique-name> \
--schedule '<5-field cron expression>' \
--prompt '<prompt text>' \
--deliver-to <target>
| Flag | Type | Required | Effect |
|---|---|---|---|
--name |
string | yes | Unique name across jobs. |
--schedule |
string | yes | 5-field cron expression (min hour dom mon dow). Validated with cron.ParseStandard. |
--prompt |
string | yes | Prompt to run at each fire. |
--deliver-to |
string | no | Delivery target — a JID for WhatsApp, a Slack channel/user id, etc. Interpreted by the running transport. |
Cron expression grammar
Rousseau uses robfig/cron/v3's standard parser. Five fields:
| Field | Range | Example |
|---|---|---|
| minute | 0–59 | */5 |
| hour | 0–23 | 9 |
| day of month | 1–31 | 1 |
| month | 1–12 or JAN–DEC | * |
| day of week | 0–6 or SUN–SAT | MON-FRI |
Common recipes:
0 9 * * MON-FRI # every weekday at 09:00
*/15 * * * * # every 15 minutes
0 */6 * * * # every 6 hours on the hour
30 8 1 * * # 08:30 on the 1st of every month
cron list
rousseau cron list
Prints one row per job:
<short-id> <on|off> <name> <cron_expr> last=<time-or-never>
<prompt> → <deliver-to>
cron remove
rousseau cron remove <name-or-id>
Matches by full or short (8-char) id, or by exact name.
cron enable / cron disable
rousseau cron enable <name-or-id>
rousseau cron disable <name-or-id>
Toggles the enabled flag without deleting. Disabled jobs are skipped by the scheduler but survive restarts.
Environment variables
Inherits every env var from config.Load. The most relevant for cron is ROUSSEAU_STATE_PATH — every cron subcommand opens the same SQLite store as chat.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Successful add/list/remove/toggle. |
| 1 | Missing required flags, invalid cron expression, store error, unknown job. |
Worked examples
rousseau cron add \
--name daily-standup \
--schedule '0 9 * * MON-FRI' \
--prompt 'Summarise yesterday'\''s git activity in team-rousseau-workspace and post it as three bullets.' \
--deliver-to '447900123456@s.whatsapp.net'
rousseau cron add \
--name weekly-digest \
--schedule '0 17 * * FRI' \
--prompt 'Read the CHANGELOG and produce a one-paragraph digest for stakeholders.' \
--deliver-to '#eng-updates'
rousseau cron add \
--name log-health \
--schedule '0 * * * *' \
--prompt 'Grep for ERROR in the last hour of journalctl output; if any, list them.' \
--deliver-to '447900123456@s.whatsapp.net'
Common failure modes
invalid cron expression— five whitespace-separated fields expected. Six-field notation with seconds is not supported.unique constraint failed— name already exists.removefirst or use a different name.- Job never fires — no transport daemon is running. Start
rousseau whatsapp/slack/ etc. deliver-toignored — some transports (email, sms) require a specific address shape. The defaultwhatsappinterpretation is a JID.