@@ -27,20 +27,20 @@ First, you need to create a trigger event ([CLI docs](https://codefresh-
27
27
io.github.io/cli/triggers/create-trigger-event/)):
28
28
29
29
``` shell
30
- codefresh create trigger-event --type cron --kind codefresh --value expression=" 0 0/5 0 ? * --value message=5min
30
+ codefresh create trigger-event --type cron --kind codefresh --value expression=" 0 0/5 * 1/1 * * " --value message=5min
31
31
```
32
32
33
33
The output will be something like this:
34
34
35
35
``` shell
36
- Trigger event: cron:codefresh:0 0/5 0 ? * *:5min:53be218399** was successfully created.
36
+ Trigger event: cron:codefresh:0 0/5 * 1/1 * * :5min:53be218399** was successfully created.
37
37
```
38
38
39
39
Then you need to attach the trigger-event to a pipeline ([ CLI
40
40
doc] ( https://codefresh-io.github.io/cli/triggers/create-pipeline-trigger/ ) ):
41
41
42
42
``` shell
43
- codefresh create t 'cron:codefresh:0 0/5 0 ? * *:test :53be218399**' <pipeline_ID>
43
+ codefresh create t ' cron:codefresh:0 0/5 * 1/1 * *:5min :53be218399**' < pipeline_ID>
44
44
```
45
45
46
46
### API
@@ -52,14 +52,14 @@ The process is the same as with the CLI. First, we create a trigger event
52
52
curl -X POST \
53
53
-H " Authorization: ${API_KEY} " \
54
54
-H ' Content-Type: application/json; charset=utf-8' \
55
- -d " {\" type\" :\" cron\" ,\" kind\" :\" codefresh\" ,\" values\" :{\" expression\" :\" 0 0/5 0 ? * *\" ,\" message\" :\" 5min\" }}" \
55
+ -d " {\" type\" :\" cron\" ,\" kind\" :\" codefresh\" ,\" values\" :{\" expression\" :\" 0 0/5 * 1/1 * *\" ,\" message\" :\" 5min\" }}" \
56
56
" https://g.codefresh.io/api/hermes/events?public=$false "
57
57
```
58
58
59
59
Output:
60
60
61
61
``` shell
62
- " cron:codefresh:0 0/5 0 ? * *:5min:53be218399**"
62
+ " cron:codefresh:0 0/5 * 1/1 * *:5min:53be218399**"
63
63
```
64
64
65
65
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