Bootstrap FreeKB - GitHub Actions - Run workflow on a cron schedule
GitHub Actions - Run workflow on a cron schedule

Updated:   |  GitHub Actions articles

GitHub Actions can be used to do something whenever something happens in one of your GitHub repositories. If you are not familiar with GitHub Actions, check out my article Getting Started with GitHub Actions.

Here is a trivial example of how you could run one of your GitHub Actions workflows on a cron schedule. It is important to recognize that on.schedule.cron is in UTC and cannot be adjusted to some other time zone.

name: my workflow
run-name: ${{ github.workflow }} run by ${{ github.actor }}
on:
  schedule:
    - cron: '*/15 * * * *'  # Once every 15 minutes
jobs:
  my-job:
    runs-on: [ubuntu-latest]
    steps:
      - name: echo Hello World
        run: echo "Hello World"

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 014fb9 in the box below so that we can be sure you are a human.