|
1 |
| -[ |
2 |
| - { |
| 1 | +{ |
| 2 | + "cron with triggered commands": { |
3 | 3 | "comment": "cron with triggered commands",
|
4 | 4 | "schedule": "* * * * *",
|
5 | 5 | "command": "echo hello",
|
6 | 6 | "project": "crontab",
|
7 | 7 | "container": "myapp",
|
8 |
| - "trigger": [ |
9 |
| - { |
10 |
| - "command": "echo world", |
11 |
| - "container": "crontab_myapp_1" |
12 |
| - } |
13 |
| - ] |
| 8 | + "trigger": [{ "command": "echo world", "container": "crontab_myapp_1" }] |
14 | 9 | },
|
15 |
| - { |
| 10 | + "map a volume": { |
16 | 11 | "comment": "map a volume",
|
17 | 12 | "schedule": "* * * * *",
|
18 | 13 | "dockerargs": "-d -v /tmp:/tmp",
|
19 | 14 | "command": "echo new",
|
20 | 15 | "image": "alpine:3.5"
|
21 | 16 | },
|
22 |
| - { |
| 17 | + "use an ENV from inside a container": { |
23 | 18 | "comment": "use an ENV from inside a container",
|
24 | 19 | "schedule": "@hourly",
|
25 | 20 | "dockerargs": "-d -e FOO=BAR",
|
26 | 21 | "command": "sh -c 'echo hourly ${FOO}'",
|
27 | 22 | "image": "alpine:3.5"
|
28 | 23 | },
|
29 |
| - { |
| 24 | + "trigger every 2 min": { |
30 | 25 | "comment": "trigger every 2 min",
|
31 | 26 | "schedule": "@every 2m",
|
32 | 27 | "command": "echo 2 minute",
|
33 | 28 | "image": "alpine:3.5",
|
34 |
| - "trigger": [ |
35 |
| - { |
36 |
| - "command": "echo world", |
37 |
| - "container": "crontab_myapp_1" |
38 |
| - } |
39 |
| - ] |
| 29 | + "trigger": [{ "command": "echo world", "container": "crontab_myapp_1" }] |
40 | 30 | },
|
41 |
| - { |
| 31 | + "null": { |
42 | 32 | "schedule": "*/5 * * * *",
|
43 | 33 | "command": "/usr/sbin/logrotate /etc/logrotate.conf"
|
44 | 34 | },
|
45 |
| - { |
| 35 | + "Regenerate Certificate then reload nginx": { |
46 | 36 | "comment": "Regenerate Certificate then reload nginx",
|
47 | 37 | "schedule": "43 6,18 * * *",
|
48 | 38 | "command": "sh -c 'dehydrated --cron --out /etc/ssl --domain ${LE_DOMAIN} --challenge dns-01 --hook dehydrated-dns'",
|
|
57 | 47 | ],
|
58 | 48 | "onstart": true
|
59 | 49 | }
|
60 |
| -] |
| 50 | +} |
0 commit comments