Search code examples
github-actions

Why does my cron configured GitHub Action not run every 2 minutes?


enter image description here

enter image description here

Why isn't cron running every 2 minutes? The effective running interval is 9 minutes.


Solution

  • From the documentation:

    The shortest interval you can run scheduled workflows is once every 5 minutes.

    which would look like

    on:
      schedule:
        - cron: '*/5 * * * *'
    

    This being said, even setting to 5 minutes doesn't necessarily run at exact 5 minute intervals; from the docs:

    Note: The schedule event can be delayed during periods of high loads of GitHub Actions workflow runs. High load times include the start of every hour. If the load is sufficiently high enough, some queued jobs may be dropped. To decrease the chance of delay, schedule your workflow to run at a different time of the hour.