Closed simonw closed 4 years ago
Asked a question about how best to do that: https://github.community/t5/GitHub-Actions/Schedule-once-an-hour-but-do-something-different-once-a-day/m-p/54350#M9148
Got a great answer there from @BrightRan:
on:
schedule:
- cron: '0 1-23 * * *'
- cron: '0 0 * * *'
jobs:
test_schedule:
name: Test schedule
runs-on: ubuntu-latest
steps:
- name: Skip this step every 24 hours
if: github.event_name == 'schedule' && github.event.schedule != '0 0 * * *'
run: echo "This step will be skipped every 24 hours"
Leaving this open until I've seen it work in the logs.
This should happen in 8 minutes time - if it does I'll close the ticket.
Ooops messed that up - I forgot to update the if
condition.
Cancelled that workflow for the above commit. Now waiting 5 mins to see if it runs on the special schedule.
Maybe just have one run every 24 hours using equivalent of REFRESH_DBS