Cron Commands
Create, manage, and monitor cron jobs directly from your terminal. Jobs are shell commands executed locally by your registered CLI agent.
Add a Cron Job
Create a new scheduled cron job:
Options
| Flag | Required | Description |
|---|---|---|
--schedule, -s | Yes | Cron expression or human-readable schedule |
--command, -c | Yes | Shell command to execute |
--working-dir, -w | No | Working directory for command execution |
--timeout, -t | No | Execution timeout as duration (e.g., 30s, 5m, 1h). Default: 1h |
--retry, -r | No | Number of retries on failure (default: 0) |
--tag | No | Tags for the job (can be specified multiple times) |
--notify-on-failure | No | Send notification on failure (default: true) |
--notify-on-success | No | Send notification on success (default: false) |
--agent | No | Agent name to assign the job to |
Name is a positional argument
The job name is the first argument, not a flag: hookwatch cron add "My Job" --schedule ...
List Cron Jobs
View all your cron jobs:
Use --all to include disabled jobs, or --status active|disabled to filter.
Get Job Details
View detailed information about a specific job by name or ID:
Edit a Job
Update an existing job's configuration:
Only include the flags for fields you want to update. Supports the same flags as add plus --agent to reassign to a different agent.
Enable / Disable
Toggle a job's enabled status:
hookwatch cron enable <name-or-id>hookwatch cron disable <name-or-id>Run Now
Manually trigger a job execution:
Creates a pending execution that the assigned CLI agent picks up and runs.
View Execution History
See recent executions:
Use --job to filter by job, --status to filter by status, and --limit to control the number of entries (default: 20).
Execution Details
View full details of a specific execution including stdout, stderr, and exit code:
Alias: hookwatch cron exec
View Next Runs
See upcoming scheduled runs for all jobs:
Use --count to control the number of upcoming runs (default:
5).
Explain Schedule
Understand what a schedule expression means:
Sync with Cloud
Bidirectional sync between local storage and the cloud dashboard:
- Local-only jobs are pushed to the cloud
- Cloud-only jobs are pulled to local storage
- Jobs in both are updated based on last modification time
- Jobs deleted from the cloud are removed locally
Remove a Job
Delete a cron job:
hookwatch cron remove <name-or-id>Aliases: rm, delete. Use --force to skip confirmation.
Warning
This permanently deletes the job and all its execution history.
Cron Service Daemon
The cron service runs as a background daemon that automatically executes your scheduled jobs and responds to cloud-triggered executions (like "Run Now" from the dashboard).
Install as System Daemon (Linux)
Install the cron service as a systemd user service that starts automatically on login:
Service Commands
| Command | Description |
|---|---|
service install [--agent-name] | Install as a systemd user service |
service uninstall | Remove the systemd service |
service start | Start the daemon |
service stop | Stop the daemon |
service status | Show daemon status |
service run [--agent-name] | Run in foreground (for debugging) |
Run in Foreground
For debugging or on non-Linux systems, you can run the service directly:
Info
The service syncs jobs with the cloud, executes scheduled jobs locally, polls for cloud-triggered executions, and reports results back via gRPC. An agent must be registered before the service can run.
Aliases
You can use jobs as a shortcut for cron:
hookwatch jobs list