Pollers
Last updated
Last updated
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 :
From the official Github Actions documentation on the , 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
These workflows can only run on the default branch
These workflows are disabled in repositories with no activity in 60 days
This only works for workflows located on the (this may change, so it's not always main
)