Created
May 13, 2023 15:01
-
-
Save memoryleak/8d6aa2d8834b42f4b9e4fc5029a128f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# See: https://crontab.guru/ | |
schedule: '*/15 4 * * *' | |
# Default: never | |
# Possible values: on-success | on-failure | always | never | |
notify: on-failure | |
tasks: | |
- name: "Print hello" # Optional | |
# Provoding a key should make these available in following tasks: | |
# - tasks.print_hello.stdout | |
# - tasks.print_hello.stderr | |
# - tasks.print_hello.exit_code | |
key: 'print_hello' # Optional, Default: Tasks sequence number | |
ignore_errors: True # False by default | |
# If command is multiline, create a temporary .sh script and execute it. | |
command: | # Mandatory | |
#!/usr/bin/env bash | |
echo "Hello" | |
exit -1 | |
- name: "Print hello world" | |
key: 'print_hello_world' | |
# Use jinja2 templating for tasks.* values | |
command: | | |
#!/usr/bin/env bash | |
echo "{{ tasks.print_hello.stdout }} World!" | |
exit 38 | |
- command: "echo \"Result of previous task was: {{ tasks.print_hello.exit_code }}\"" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment