-
-
Notifications
You must be signed in to change notification settings - Fork 3
26 lines (24 loc) · 844 Bytes
/
cron.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events
name: Cron
on:
schedule:
# * is a special character in YAML so you have to quote this string
# This example triggers the workflow every day at 5:30 and 17:30 UTC
# https://crontab.cronhub.io/
- cron: '30 5,17 * * *'
- cron: '30 5 * * 1,3'
- cron: '30 5 * * 2,4'
jobs:
cron:
runs-on: ubuntu-latest
steps:
- run: date
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule
cron-schedule:
runs-on: ubuntu-latest
steps:
- name: Not on Monday or Wednesday
if: github.event.schedule != '30 5 * * 1,3'
run: echo "This step will be skipped on Monday and Wednesday"
- name: Every time
run: echo "This step will always run"