Skip to content

Commit 517ebdb

Browse files
authored
Update documentation for cron change (#3194)
* initial commit * run prettier * change to office hours link * fix lint :/
1 parent 642828d commit 517ebdb

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

β€Žfrontend/docs/pages/v1/cron-runs.mdxβ€Ž

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,18 @@ Hatchet supports cron triggers to run on a schedule defined in a few different w
2929

3030
### Cron Expression Syntax
3131

32-
Cron expressions in Hatchet follow the standard cron syntax. A cron expression consists of five fields separated by spaces:
32+
Cron expressions in Hatchet follow the standard cron syntax. Hatchet supports both 5-field and 6-field expressions.
33+
A cron expression consists 5 to 6 fields separated by spaces. If there are 6 fields, the first field is seconds; if
34+
there are 5 fields, the first field is minutes.
3335

3436
```
35-
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ minute (0 - 59)
36-
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ hour (0 - 23)
37-
β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ day of the month (1 - 31)
38-
β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ month (1 - 12)
39-
β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ day of the week (0 - 6) (Sunday to Saturday)
40-
* * * * *
37+
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ second (0 - 59) (optional)
38+
| β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ minute (0 - 59)
39+
β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ hour (0 - 23)
40+
β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ day of the month (1 - 31)
41+
β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ month (1 - 12)
42+
β”‚ β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ day of the week (0 - 6) (Sunday to Saturday)
43+
* * * * * *
4144
```
4245

4346
Each field can contain a specific value, an asterisk (`*`) to represent all possible values, or a range of values. Here are some examples of cron expressions:
@@ -46,6 +49,12 @@ Each field can contain a specific value, an asterisk (`*`) to represent all poss
4649
- `*/15 * * * *`: Run every 15 minutes
4750
- `0 9 * * 1`: Run every Monday at 9 AM
4851
- `0 0 1 * *`: Run on the first day of every month at midnight
52+
- `30 * * * * *`: Run at 30 seconds past every minute (6-field)
53+
54+
<Callout type="info">
55+
Keep in mind, Hatchet Cloud meters by Task runs so use seconds wisely. Have
56+
questions about pricing? [Contact us](https://hatchet.run/office-hours)
57+
</Callout>
4958

5059
## Defining a Cron in Your Task Definition
5160

0 commit comments

Comments
Β (0)