githubcrongithub-actions

Does timezone matter when setting up cron schedule in github workflows?


on:
  schedule:
  - cron: '*/5 18-20 * * 1-5' #Every 5 minutes, between 06:00 PM and 08:59 PM, Monday through Friday

Should I modify this to accommodate for timezone difference if my timezone is Philippine Standard Time (GMT+8)?

I tried testing it but it is often delayed by varying minutes.


Solution

  • According to schedule:

    You can schedule a workflow to run at specific UTC times using POSIX cron syntax.

    By default, UTC is used. So, you need to adjust it according to your own timezone.

    Regarding delays:

    The schedule event can be delayed during periods of high loads of GitHub Actions workflow runs. High load times include the start of every hour. If the load is sufficiently high enough, some queued jobs may be dropped. To decrease the chance of delay, schedule your workflow to run at a different time of the hour.