|
Originally brought up at actions/runner#1423, but I don't think anyone actually started a discussion.
Among other things, the use case I have in mind is to run a workflow at 10AM local time (the start of the workday), but the best I can do currently is 15:00 UTC (9:00 CST, 10:00 CDT) or 16:00 UTC (10:00 CST, 11:00 CDT), meaning that ~half the year, it'll run at an undesirable time. Important Please do not comment "waiting...", "+1", "need this", etc. It adds nothing to the conversation and spams inboxes. Instead, leave a thumbs up and/or upvote to show your interest in this feature. If you'd like to follow along for any updates to this thread, you can subscribe to the discussion by clicking the "Subscribe" button on the sidebar. |
Replies: 41 comments 44 replies
|
Why isn't this implemented yet? gitlab is already having this functionality afaik |
|
Any existing workaround? Also, I see that the workflow is sometimes not triggered at all even though I have my own runner which is in idle state. |
|
Thanks for the feedback @cj81499. I certainly agree that time zones and scheduling is tricky, so I'll make sure that this is on the backlog. |
|
We are also interested in this feature. Are there any plans to implement a timezone support? |
|
Just bringing up another use case that would benefit with the addition of this, in case it further helps convince the addition of this feature. For asian timezone regions, such as here in Singapore (GMT+8), a relatively simple use case of running a workflow on midnight of every 1st day of the month, is basically impossible to schedule as: 12AM here on the first day of the month would be have been basically impossible to write with cron, since, it would require writing it as 4PM of the last day of the month could be 28, 29, 30 or 31. For example: Having this would make it easy to schedule with just a |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Another really useful feature would be to be able to add random jitter like cron supports because we can run into ratelimits when we have multiple actions running at the same time. |
|
As a super hacky workaround, you can schedule your workflow to run at BOTH standard and daylight times, and then use a bash script to filter out the undesirable runs. This means you'll have 2 runs for every schedule date, but only one of them will execute past the Something like this should work: on:
schedule:
- cron: "00 18,19 * * TUE" # Run every tuesday at 12:00 noon MDT (GMT-6) and MST (GMT-7)
env:
TZ: "America/Edmonton"
LOCAL_TIME: "12:00"
jobs:
test-date:
runs-on: ubuntu-latest
steps:
- name: Test schedule
if: github.event_name == 'schedule'
run: |
now=$(date +%s)
local_time=$(date -d "$LOCAL_TIME" +%s)
if [[ $now -gt $local_time && $now -lt "$((local_time + 3600))" ]]; then
echo "🌞 Passed daylight savings time check!"
else
echo "⏱ Waiting until $LOCAL_TIME."
exit 1
fi |
|
I've created a Workaround like @bcowdery, but mine won't fail the run: on:
schedule:
- cron: '5 16,17 * * *'
jobs:
check-run:
runs-on: ubuntu-latest
outputs:
run: ${{ steps.check_local_time.outputs.run }}
steps:
- name: Check local time
id: check_local_time
env:
TRIGGER: ${{ github.event_name }}
run: |
echo "Trigger: ${TRIGGER}"
if [[ ${TRIGGER} == 'schedule' ]]; then
echo "Checking daylight saving time"
if [ $(date --date='TZ="Europe/Berlin" now' +%H) -eq '18' ]; then
echo 'Time to run!'
echo "run=True" >> "$GITHUB_OUTPUT"
else
echo "It's not 18:05 local time in Europe/Berlin. Waiting for next execution..."
echo "run=False" >> "$GITHUB_OUTPUT"
fi
else
echo 'Trigger is not cron, ommiting time check!'
echo "run=True" >> "$GITHUB_OUTPUT"
fi
my-job:
runs-on: ubuntu-latest
if: needs.check-run.outputs.run == 'True'
needs: check-runStill, I would love to not use this workaround, but perhaps this is useful for anybody. |
|
This is a much needed feature in GH, any updates on this please. |
|
any progress on this feature? thanks! |
|
Hi guys any updates on this? |
|
Seems like easy to implement and would sove a lot of problem. |
|
Sorry no one has commented on this for a while, I will add this to our papercut backlog we are working though. I don't have a timeframe right now but I will check what the effort is. Thanks for your patience with this <3 |
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
Reading the comments here, it is unclear to me whether or not the code responsible for accommodating timezone is public or not. If it is, can someone share which repo and code the community can work with to add this feature? |
|
I need this feature. |
|
Since GitHub Actions doesn’t support timezones in cron scheduling yet, here’s a possible workaround to run workflows at local times like 8 AM PST. name: Run Task at 8 AM
on:
schedule:
# Runs at 3 PM UTC (8 AM PDT) and 4 PM UTC (8 AM PST)
- cron: '0 15,16 * * *'
jobs:
check_time:
runs-on: ubuntu-latest
steps:
- name: Check if it's 8 AM
run: |
current_hour=$(TZ='America/Los_Angeles' date +'%H')
echo "Current hour in PST: $current_hour"
if [ "$current_hour" == "08" ]; then
echo "It's 8 AM PST! Running tasks..."
echo "run_tasks=true" >> $GITHUB_ENV
fi
- name: Execute Scheduled Tasks
if: env.run_tasks == 'true'
run: echo "Executing scheduled tasks..."
|
|
For an approximate answer, I noted that the DST transition for |
|
Setting the |
|
Any updates on this? We need this feature in our project as well and now have to manually adjust schedule two times per year. We can manage with a workaround provided by @coltenkrauter (thanks by the way!) but it would be way better to just give the timezone and forget about it. |
|
We are currently having a look at this to see what we can do :) hopefully this is something we can get moving very soon |
|
We also would love to have this feature asap. |
|
We should be on track for end of March for a public beta, public roadmap is updated and has this in :) |
|
https://github.blog/changelog/2026-03-19-github-actions-late-march-2026-updates/ We are now live :) Thank you everyone who engaged on this. I know that you all waited and that you were let down at times. I will keep pushing to get our top items closed out on Actions, I will keep being in the community as much as I can from my time to understand what you all need. And please please keep telling us what you need, it is not 'screaming into the void' we are here :) |
|
I'm likely to get in a bit of trouble, but I just want to say a big thank you. The community knows this has been a long time coming and it's finally here. Thank you for making our lives just that bit easier. |
|
❤️ |
|
Hi! Thanks for the feature :) Do you know if the schedule:
- cron: '0 8 * * *'
timezone: ${{ vars.TZ }} |
https://github.blog/changelog/2026-03-19-github-actions-late-march-2026-updates/ We are now live :)
Thank you everyone who engaged on this. I know that you all waited and that you were let down at times. I will keep pushing to get our top items closed out on Actions, I will keep being in the community as much as I can from my time to understand what you all need. And please please keep telling us what you need, it is not 'screaming into the void' we are here :)