Cron Syntax Reference
Aigentic uses standard cron expressions to define when scheduled tasks run. This reference covers the full syntax with examples.
Cron Expression Format
Section titled “Cron Expression Format”A cron expression consists of five fields separated by spaces:
┌───────────── minute (0-59)│ ┌───────────── hour (0-23)│ │ ┌───────────── day of month (1-31)│ │ │ ┌───────────── month (1-12)│ │ │ │ ┌───────────── day of week (0-6, Sunday=0)│ │ │ │ │* * * * *| Field | Allowed Values | Special Characters |
|---|---|---|
| Minute | 0-59 | * , - / |
| Hour | 0-23 | * , - / |
| Day of month | 1-31 | * , - / |
| Month | 1-12 or JAN-DEC | * , - / |
| Day of week | 0-6 or SUN-SAT (Sunday=0) | * , - / |
Special Characters
Section titled “Special Characters”| Character | Meaning | Example |
|---|---|---|
* | Any value | * * * * * — every minute |
, | Value list separator | 1,15 * * * * — minute 1 and 15 |
- | Range | 1-5 * * * * — minutes 1 through 5 |
/ | Step values | */15 * * * * — every 15 minutes |
Common Patterns
Section titled “Common Patterns”| Pattern | Cron Expression | Description |
|---|---|---|
| Every 5 minutes | */5 * * * * | Runs at :00, :05, :10, etc. |
| Every 15 minutes | */15 * * * * | Runs at :00, :15, :30, :45 |
| Every hour | 0 * * * * | Runs at the top of every hour |
| Daily at 8 AM | 0 8 * * * | Runs at 8:00 AM |
| Daily at 6 PM | 0 18 * * * | Runs at 6:00 PM |
| Twice daily | 0 8,18 * * * | Runs at 8:00 AM and 6:00 PM |
| Weekdays at 9 AM | 0 9 * * 1-5 | Monday through Friday at 9:00 AM |
| Every Monday at 8 AM | 0 8 * * 1 | Monday at 8:00 AM |
| Every Friday at 5 PM | 0 17 * * 5 | Friday at 5:00 PM |
| First day of month | 0 0 1 * * | 1st of every month at midnight |
| Business hours every 30 min | */30 9-17 * * 1-5 | Every 30 min, 9 AM-5 PM, Mon-Fri |
Day of Week Reference
Section titled “Day of Week Reference”| Value | Day |
|---|---|
| 0 | Sunday |
| 1 | Monday |
| 2 | Tuesday |
| 3 | Wednesday |
| 4 | Thursday |
| 5 | Friday |
| 6 | Saturday |
You can also use three-letter abbreviations: SUN, MON, TUE, WED, THU, FRI, SAT.
Examples with Explanation
Section titled “Examples with Explanation”30 8 * * 1-5
Section titled “30 8 * * 1-5”- Minute: 30
- Hour: 8
- Day of month: any
- Month: any
- Day of week: Monday through Friday
Runs at 8:30 AM every weekday.
0 */4 * * *
Section titled “0 */4 * * *”- Minute: 0
- Hour: every 4 hours (0, 4, 8, 12, 16, 20)
- Day of month: any
- Month: any
- Day of week: any
Runs at midnight, 4 AM, 8 AM, noon, 4 PM, and 8 PM every day.
15 10 1,15 * *
Section titled “15 10 1,15 * *”- Minute: 15
- Hour: 10
- Day of month: 1st and 15th
- Month: any
- Day of week: any
Runs at 10:15 AM on the 1st and 15th of every month.
Visual Schedule Builder
Section titled “Visual Schedule Builder”The Automation page provides a visual schedule builder with Minute, Hour, and Day of Week dropdowns so you don’t need to write cron expressions manually. A live preview shows the human-readable schedule description and the corresponding cron expression. The builder generates expressions in the format {minute} {hour} * * {dayOfWeek}, with day of month and month always set to *.
For more advanced schedules (e.g., specific days of month, step intervals), use the cron expression syntax directly via the chat-based cron tools.