Interview Prep/CI/CD/GitHub Actions

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 →

  1. on: schedule: - cron: '17 2 * * *' (UTC) and also add workflow_dispatch for manual runs.
  2. Avoid the top of the hour, since peak load delays runs.
  3. 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.

All CI/CD questions

More on GitHub Actions