Scheduling Guide
HookWatch supports both standard cron expressions and human-readable schedules. Learn how to define when your jobs run.
Human-readable Schedules
The easiest way to define a schedule. HookWatch automatically converts these to cron expressions.
| Schedule | Description |
|---|---|
every minute | Runs every minute |
every 5 minutes | Runs every 5 minutes |
every hour | Runs at the start of every hour |
every day at 9am | Runs daily at 9:00 AM |
every day at 2:30pm | Runs daily at 2:30 PM |
every monday at 9am | Runs every Monday at 9:00 AM |
every weekday at 9am | Runs Monday-Friday at 9:00 AM |
every month on the 1st | Runs on the 1st of every month |
every sunday at midnight | Runs every Sunday at 12:00 AM |
Cron Expression Format
For more complex schedules, use standard 5-field cron expressions:
┌───────────── minute (0-59) │ ┌───────────── hour (0-23) │ │ ┌───────────── day of month (1-31) │ │ │ ┌───────────── month (1-12) │ │ │ │ ┌───────────── day of week (0-6, Sunday=0) │ │ │ │ │ * * * * *
Special Characters
| Character | Meaning | Example |
|---|---|---|
* | Any value | * * * * * - every minute |
, | Value list | 0 9,17 * * * - at 9am and 5pm |
- | Range | 0 9 * * 1-5 - weekdays at 9am |
/ | Step | */15 * * * * - every 15 minutes |
@ | Preset | @hourly, @daily, @weekly |
Common Examples
Every 5 minutes
*/5 * * * *Every hour at minute 30
30 * * * *Daily at 2:00 AM
0 2 * * *Weekdays at 9:00 AM
0 9 * * 1-5Every Sunday at midnight
0 0 * * 0First day of month at 6:00 AM
0 6 1 * *Every 6 hours
0 */6 * * *9am and 5pm on weekdays
0 9,17 * * 1-5Preset Schedules
Use these shortcuts for common schedules:
| Preset | Equivalent | Description |
|---|---|---|
@yearly | 0 0 1 1 * | Once a year at midnight on Jan 1st |
@monthly | 0 0 1 * * | Once a month at midnight on the 1st |
@weekly | 0 0 * * 0 | Once a week at midnight on Sunday |
@daily | 0 0 * * * | Once a day at midnight |
@hourly | 0 * * * * | Once an hour at the beginning |
Explain a Schedule
Use the CLI to understand what a cron expression means:
Terminal
Timezone
All schedules run in UTC timezone. Make sure to convert your local time when setting schedules. For example, 9am EST is 2pm UTC (during standard time).
Tips
- Start with human-readable schedules - they're easier to understand and less error-prone
- Use the
hookwatch cron explaincommand to verify your expression before creating a job - Avoid running jobs at exactly the top of the hour (e.g.,
0 * * * *) - many systems do this, which can cause congestion - The minimum interval is 1 minute. For more frequent execution, consider using webhooks instead