Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 1.04 KB

File metadata and controls

29 lines (20 loc) · 1.04 KB

Registering a scheduled task

Linux (cron)

# Every day at 19:15 — lock shared via the state repo, phone alert on failure
15 19 * * * STATE_REPO_DIR=$HOME/my-state-repo NTFY_TOPIC=my-alerts /path/to/claude-code-cron/runner.sh my-task $HOME/my-project prompts/my-task.md

claude must be on cron's PATH — either extend PATH= at the top of your crontab or symlink the binary into /usr/local/bin.

Windows (Task Scheduler)

Edit the paths in runner.cmd, then:

schtasks /create /tn "My Claude Task" /tr "C:\path\to\claude-code-cron\runner.cmd" /sc daily /st 19:15 /f

Use one copy of runner.cmd per task (it's four set lines — copy, rename, edit).

Multiple machines, one task

Point every machine's STATE_REPO_DIR at a clone of the same git repo (any private repo with a state/ directory works). Whichever machine fires first claims the day via claim-task.sh; the others see SKIP/LOST and exit quietly. Machines that are off simply never compete — the task runs as long as at least one machine is up.