Issue
I saw this on the crontab.guru website:
Does GitHub Actions support this syntax? That is, can I define a CI workflow like this?
name: "Do something every week"
on:
schedule:
- cron: "@weekly"
Solution
It does not work (yet) because it has an invalid syntax.
You can schedule a workflow to run at specific UTC times using POSIX cron syntax. Scheduled workflows run on the latest commit on the default or base branch. The shortest interval you can run scheduled workflows is once every 5 minutes.
This can be quickly verified using the GitHub Actions extension on VS Code:
The other non-standard strings (@weekly
, @monthly
, ...) also give the same error.
If you test it on GitHub your workflow will never run, even if you manually trigger it with workflow_dispatch
.
Answered By - creme332 Answer Checked By - Cary Denson (WPSolving Admin)