| name | crnd |
| description | Schedule and manage cron jobs, one-time scheduled tasks, and recurring jobs using the crnd CLI. Use when the user wants to set up cronjobs, scheduled jobs, one-time tasks, recurring/repetitive jobs, automate tasks at specific times, or manage background processes. Triggers include requests like "run this every day at 2am", "schedule a backup", "set up a recurring task", "run this once tomorrow", or "create a cron job". |
crnd
Local cron daemon with text-first output, no prompts, real OS processes. Use --json for machine-readable output.
Installation
bunx crnd
brew install ysm-dev/crnd/crnd
Quick Reference
| Task | Command |
|---|
| Create cron job | crnd schedule -n NAME -s "CRON" -- command args |
| Create one-time job (relative) | crnd schedule -n NAME -i DURATION -- command |
| Create one-time job (absolute) | crnd schedule -n NAME -a "ISO_TIMESTAMP" -- command |
| List all jobs | crnd list |
| Job status | crnd status -n NAME |
| Run immediately | crnd run-once -n NAME |
| View logs | crnd logs -n NAME |
| Stream logs | crnd logs -n NAME -s |
| Pause job | crnd pause -n NAME |
| Resume job | crnd resume -n NAME |
| Stop gracefully | crnd stop -n NAME |
| Kill immediately | crnd kill -n NAME |
| Delete job | crnd delete -n NAME -f |
| Run history | crnd runs -n NAME |
| Check setup | crnd doctor |
All commands default to text output; use --json for machine-readable output.
Scheduling Jobs
Cron Jobs (Recurring)
crnd schedule -n backup -s "0 2 * * *" -- rsync -a ~/docs ~/backup
crnd schedule -n healthcheck -s "0 * * * *" -- curl http://localhost:8080/health
crnd schedule -n standup-reminder -s "0 9 * * 1-5" -z "America/New_York" -- notify "Standup in 15 minutes"
crnd schedule -n monitor -s "*/5 * * * *" -- ./check-system.sh
One-Time Jobs (Relative Time)
crnd schedule -n reminder -i 10m -- say "Time to stretch!"
crnd schedule -n deploy -i 2h -- ./deploy.sh
crnd schedule -n backup -i 1d -- rsync -a ~/docs ~/backup
Relative time formats: 30s, 5m, 2h, 1d, 1w, 1y
One-Time Jobs (Absolute Time)
crnd schedule -n deploy -a "2026-02-01T10:00:00Z" -- ./deploy.sh
crnd schedule -n reminder -a "2026-03-15T14:30:00-05:00" -- notify "Meeting starts now"
Natural Language to Flags
| User says | Flag | Example value |
|---|
| "in 5 minutes" | -i | 5m |
| "in 2 hours" | -i | 2h |
| "tomorrow" | -i | 1d |
| "in a week" | -i | 1w |
| "tomorrow at 9am" | -a | "2026-02-04T09:00:00" |
| "every day at 8am" | -s | "0 8 * * *" |
| "weekdays at 9am" | -s | "0 9 * * 1-5" |
| "every Monday 10am" | -s | "0 10 * * 1" |
| "every hour" | -s | "0 * * * *" |
Cron Expression Format
5-field standard: minute hour day-of-month month day-of-week
| Field | Values | Special |
|---|
| Minute | 0-59 | * / , - |
| Hour | 0-23 | * / , - |
| Day of Month | 1-31 | * / , - |
| Month | 1-12 | * / , - |
| Day of Week | 0-6 (Sun=0) | * / , - |
Common patterns:
0 * * * * - every hour
*/15 * * * * - every 15 minutes
0 2 * * * - daily at 2am
0 0 * * 0 - weekly on Sunday midnight
0 9 * * 1-5 - weekdays at 9am
0 0 1 * * - monthly on the 1st
Managing Jobs
Monitoring
crnd list
crnd list --json
crnd status -n backup
crnd runs -n backup
crnd logs -n backup
crnd logs -n backup -s
crnd logs -n backup -t
Control
crnd run-once -n backup
crnd pause -n backup
crnd resume -n backup
crnd stop -n backup
crnd kill -n backup
crnd delete -n backup -f
Import/Export
crnd export > jobs.toml
crnd import -f jobs.toml
Daemon Management
crnd daemon start
crnd daemon stop
crnd daemon status
crnd daemon install
crnd daemon uninstall
crnd doctor
jobs.toml Format
Jobs are stored in ~/.config/crnd/jobs.toml (Linux/macOS) or %APPDATA%\crnd\jobs.toml (Windows). Edit directly; daemon watches for changes.
[jobs.backup]
command = ["rsync", "-a", "/src", "/dst"]
schedule = "0 2 * * *"
timezone = "UTC"
timeout_ms = 600000
[jobs.deploy]
command = ["./deploy.sh"]
run_at = "2026-02-01T10:00:00Z"
Common Workflows
Set up a daily backup
crnd daemon start
crnd schedule -n daily-backup -s "0 3 * * *" -z "UTC" -- rsync -av ~/important ~/backup
crnd run-once -n daily-backup
crnd daemon install
Schedule a one-time deployment
crnd schedule -n prod-deploy -a "2026-02-15T02:00:00Z" -- ./deploy.sh production
crnd status -n prod-deploy
Monitor a recurring job
crnd runs -n backup
crnd logs -n backup
crnd status -n backup
Pause during maintenance
crnd pause -n backup
crnd resume -n backup