GitHub Actions Schedule Misalignment | Generated by AI
This is a Git-style (e.g. GitHub Actions) scheduled trigger. Let’s break it down:
-
on: schedule:
Tells the workflow to run on a calendar schedule, not just on push or pull-request events. -
- cron: '0 * * * *'
A standard five-field cron expression:┌──────── minute (0) │ ┌────── hour (*, i.e. every hour) │ │ ┌──── day-of-month (*, i.e. every day) │ │ │ ┌── month (*, i.e. every month) │ │ │ │ ┌ day-of-week (*, i.e. every day of the week) │ │ │ │ │ 0 * * * *
→ Runs at minute 0 of every hour (i.e. at 00:00, 01:00, 02:00…23:00 UTC), every day.
-
But the comments above it say:
Run every hour from 05:00–13:00 UTC, Mon–Fri 05:00–13:00 UTC = 13:00–21:00 Beijing time (UTC+8)
That intention (weekdays, only those hours) would actually require a more specific cron, for example:
on: schedule: - cron: '0 5-13 * * 1-5'
which means:
- at minute 0,
- during hours 5 through 13 UTC,
- on days Monday (1) through Friday (5).
In Beijing time (UTC+8), that indeed corresponds to 13:00–21:00 local time, weekdays.
In short:
- As written (
'0 * * * *'
), it will fire every hour on the hour, 24×7. - The comments describe a weekday-only, 05:00–13:00 UTC window—if that’s what you want, change the cron to include
5-13
for the hour field and1-5
for the weekday field.