Skip to content

Commit 018938a

Browse files
authored
Merge pull request circleci#5074 from circleci/ts/clarify-cron-syntax
Add: clarification on valid cron syntax.
2 parents b07dbba + 5d2b9b0 commit 018938a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

jekyll/_cci2/workflows.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,23 @@ The value of the `cron` key must be a [valid crontab entry](https://crontab.guru
278278
**Note:**
279279
Cron step syntax (for example, `*/1`, `*/20`) is **not** supported. Range elements within comma-separated lists of elements are also **not** supported. In addition, range elements for days (for example, `Tue-Sat`) is **not** supported. Use comma-separated digits instead.
280280

281+
282+
Example **invalid** cron range syntax:
283+
284+
```yaml
285+
triggers:
286+
- schedule:
287+
cron: "5 4 * * 1,3-5,6" # < the range separator with `-` is invalid
288+
```
289+
290+
Example **valid** cron range syntax:
291+
292+
```yaml
293+
triggers:
294+
- schedule:
295+
cron: "5 4 * * 1,3,4,5,6"
296+
```
297+
281298
The value of the `filters` key must be a map that defines rules for execution on specific branches.
282299

283300
For more details, see the `branches` section of the [Configuring CircleCI]({{ site.baseurl }}/2.0/configuration-reference/#branches-1) document.

0 commit comments

Comments
 (0)