Setting Cron Locale

One thing I hadn’t realised today is that scheduled workflows seem to only run in UTC time.

I have an action that processes data at a particular time every day and that time changes compared to UTC based on the daylight savings.

By way of an example I need my workflow to run at 1900 UK time, no-matter if it’s daylight savings or not.

Currently, as we are in daylight savings time, setting the Cron to run at 1900 causes it to run an hour late.

From the documentation there does not appear to be the option to set a locale. Although POSIX Cron does seem to have the ability to understand a locale.

Is there some feature I’m not seeing to set a locale? Is there another way of solving my problem?

You could try to schedule the workflow for both possible times (with/without DST), and have a job that checks the time in your timezone. Then other jobs could run or skip depending on the result.

However, scheduled workflows aren’t exactly the right tool if you need precise timing, as the documentation notes:

The schedule event can be delayed during periods of high loads of GitHub Actions workflow runs.

(From: Scheduled events)

1 Like

So I’m going to take your idea and modify it slightly, I’m going to set it an hour earlier from April to October (I think that’s the right way around).