Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit94d2d38

Browse files
committed
corrected the expression
1 parent6d5756f commit94d2d38

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎_docs/kb/articles/create-cron-via-cli-api.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ First, you need to create a trigger event ([CLI docs](https://codefresh-
2727
io.github.io/cli/triggers/create-trigger-event/)):
2828

2929
```shell
30-
codefresh create trigger-event --type cron --kind codefresh --value expression="0 0/50 ? * --value message=5min
30+
codefresh create trigger-event --type cron --kind codefresh --value expression="0 0/5* 1/1 * *" --value message=5min
3131
```
3232

3333
The output will be something like this:
3434

3535
```shell
36-
Trigger event: cron:codefresh:0 0/50 ? * *:5min:53be218399** was successfully created.
36+
Trigger event: cron:codefresh:0 0/5* 1/1**:5min:53be218399** was successfully created.
3737
```
3838

3939
Then you need to attach the trigger-event to a pipeline ([CLI
4040
doc](https://codefresh-io.github.io/cli/triggers/create-pipeline-trigger/)):
4141

4242
```shell
43-
codefresh create t 'cron:codefresh:0 0/50 ? * *:test:53be218399**' <pipeline_ID>
43+
codefresh create t'cron:codefresh:0 0/5* 1/1 * *:5min:53be218399**'<pipeline_ID>
4444
```
4545

4646
###API
@@ -52,14 +52,14 @@ The process is the same as with the CLI. First, we create a trigger event
5252
curl -X POST\
5353
-H"Authorization:${API_KEY}"\
5454
-H'Content-Type: application/json; charset=utf-8'\
55-
-d"{\"type\":\"cron\",\"kind\":\"codefresh\",\"values\":{\"expression\":\"0 0/50 ? * *\",\"message\":\"5min\"}}"\
55+
-d"{\"type\":\"cron\",\"kind\":\"codefresh\",\"values\":{\"expression\":\"0 0/5* 1/1 * *\",\"message\":\"5min\"}}"\
5656
"https://g.codefresh.io/api/hermes/events?public=$false"
5757
```
5858

5959
Output:
6060

6161
```shell
62-
"cron:codefresh:0 0/50 ? * *:5min:53be218399**"
62+
"cron:codefresh:0 0/5* 1/1 * *:5min:53be218399**"
6363
```
6464

6565
And then attach this event to a pipeline using the output event URI (URL-incoded) from the previous call ([APIdocs](https://g.codefresh.io/api/#operation/triggers-create)):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp