Lessons

How to run Github Actions on a Schedule

It is very simple! Github Actions can use CRON schedule to trigger a workflow. Here is a sample workflow:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 name: Master on: push: branches: - master schedule: - cron: '0 8 1 * *' jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Running run: | echo "Running!"

The workflow above can run on pushes to master or on the first of the month at 8:00 am. The easiest way to determine CRON schedule is to use a CRON schedule builder.

This was a short one. Thanks for reading!