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:

Terminal

Options

FlagRequiredDescription
--schedule, -sYesCron expression or human-readable schedule
--command, -cYesShell command to execute
--working-dir, -wNoWorking directory for command execution
--timeout, -tNoExecution timeout as duration (e.g., 30s, 5m, 1h). Default: 1h
--retry, -rNoNumber of retries on failure (default: 0)
--tagNoTags for the job (can be specified multiple times)
--notify-on-failureNoSend notification on failure (default: true)
--notify-on-successNoSend notification on success (default: false)
--agentNoAgent 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:

Terminal

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:

Terminal

Edit a Job

Update an existing job's configuration:

Terminal

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:

Terminal

Creates a pending execution that the assigned CLI agent picks up and runs.

View Execution History

See recent executions:

Terminal

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:

Terminal

Alias: hookwatch cron exec

View Next Runs

See upcoming scheduled runs for all jobs:

Terminal

Use --count to control the number of upcoming runs (default: 5).

Explain Schedule

Understand what a schedule expression means:

Terminal

Sync with Cloud

Bidirectional sync between local storage and the cloud dashboard:

Terminal
  • 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:

Terminal

Service Commands

CommandDescription
service install [--agent-name]Install as a systemd user service
service uninstallRemove the systemd service
service startStart the daemon
service stopStop the daemon
service statusShow 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:

Terminal

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

Related