A scheduled workflow should run every night, but it never runs on forks and sometimes is delayed.
BeginnerScenarioGitHub Actions
Answer
Situation read → Behaviour of schedule.
What I'd do →
on: schedule: - cron: '17 2 * * *'(UTC) and also addworkflow_dispatchfor manual runs.- Avoid the top of the hour, since peak load delays runs.
- Remember scheduled workflows run from the default branch only, and are disabled after 60 days of repo inactivity in public repos.
Why → These are documented properties, not bugs.
Interview tip → Cron is always UTC.
More on GitHub Actions
What are workflows, jobs, steps and actions in GitHub Actions?BeginnerWhat events can trigger a workflow?BeginnerWhat is the difference between `pull_request` and `pull_request_target`?AdvancedWhat is a runner, and how do GitHub-hosted and self-hosted runners differ?BeginnerHow do you pass data between steps and between jobs?IntermediateHow does a build matrix work?Intermediate