Automations
Create one-time, recurring, and manually triggered CrabCode jobs through the CLI cron daemon or the desktop Automations page.
What it is
CrabCode automations are executed by the local crabcode-cron daemon. The CLI and desktop GUI share the same local backend. Jobs can run once at a fixed time, run on a cron schedule, or be triggered immediately.
The desktop Automations page is wired to real App Server cron/* methods: it reads daemon status, lists jobs, shows recent runs, creates jobs, updates jobs, removes jobs, and triggers jobs.
GUI
Open Automations from the left sidebar.
| Area | Purpose |
|---|---|
| Daemon status | Availability, version, total jobs, enabled jobs |
| Create form | Name, action text, one-time schedule or cron expression |
| Job list | View, enable/disable, run now, remove |
| Recent runs | Expand a job and inspect recent fire-log entries |
The action text should be self-contained, for example:
Every weekday, inspect /Users/me/project CI status and summarize failures with suggested fixes.Every weekday, inspect /Users/me/project CI status and summarize failures with suggested fixes.CLI
crabcode cron status
crabcode cron list
crabcode cron add --name "Daily check" --schedule "0 9 * * *" --message "Inspect project health and summarize risk"
crabcode cron add --name "Release reminder" --at "2026-05-27T15:00:00-07:00" --message "Remind me to review the release checklist"
crabcode cron add --name "Short interval test" --every-ms 60000 --message "Check the task queue once"
crabcode cron edit <id> --name "New name"
crabcode cron disable <id>
crabcode cron enable <id>
crabcode cron run <id>
crabcode cron runs <id> --limit 20
crabcode cron rm <id>crabcode cron status
crabcode cron list
crabcode cron add --name "Daily check" --schedule "0 9 * * *" --message "Inspect project health and summarize risk"
crabcode cron add --name "Release reminder" --at "2026-05-27T15:00:00-07:00" --message "Remind me to review the release checklist"
crabcode cron add --name "Short interval test" --every-ms 60000 --message "Check the task queue once"
crabcode cron edit <id> --name "New name"
crabcode cron disable <id>
crabcode cron enable <id>
crabcode cron run <id>
crabcode cron runs <id> --limit 20
crabcode cron rm <id>--schedule, --at, and --every-ms are mutually exclusive.
App Server methods
| Method | Purpose |
|---|---|
cron/status | Daemon health and metadata |
cron/list | List jobs |
cron/runs | Recent runs for a job |
cron/add | Create a job |
cron/update | Update enabled state, name, description, or schedule |
cron/remove | Remove a job |
cron/run | Trigger now |
Troubleshooting
| Symptom | Fix |
|---|---|
cron/status is unavailable | Check CRABCODE_DISABLE_CRON, restart the desktop app, or rerun the CLI |
| GUI shows no jobs | Run crabcode cron list to confirm daemon access |
| Job does not fire | Check cron expression, timezone, and enabled state |
| Run-now fails | Run crabcode cron run <id> in the CLI and inspect the error |