Pollers
There may be times where you wish to have a workflow run at a fixed duration. For instance, using a workflow to fetch and update a set of data everyday. Github Actions supports such workflows by offering the schedule
event type that triggers a workflow.
To declare such a workflow, use the schedule
event type along with the cron
key, specify a cron schedule format:
From the official Github Actions documentation on the schedule
event, you would specify the cron schedule and this will cause the workflow to be triggered at the given timing. You could even schedule it multiple times a day or across different times.
Once again, taken from the official Github Actions documentation.
You can use this "poller" pattern in conjunction with some of the next use cases to really power up your workflows. We will discuss them as we go.
There are several restrictions to this event type:
There may be delays to when exactly the workflow runs due to an increase in workload
This only works for workflows located on the default branch (this may change, so it's not always
main
)These workflows can only run on the default branch
These workflows are disabled in repositories with no activity in 60 days
Last updated