From 3add6257db3127e4f802a3aa3009b79da5bceb2b Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Fri, 24 Apr 2026 16:25:36 +0700 Subject: [PATCH] feat: add 00:00 UTC+7 schedule and document how to customize cron --- .github/workflows/trigger-routine.yml | 4 +++- README.md | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/trigger-routine.yml b/.github/workflows/trigger-routine.yml index 09b3f8a..0581323 100644 --- a/.github/workflows/trigger-routine.yml +++ b/.github/workflows/trigger-routine.yml @@ -2,7 +2,9 @@ name: Trigger Claude Code Routine on: schedule: - # UTC+7 (Asia/Ho_Chi_Minh) → UTC + # Edit this list to change when the routine fires. + # Cron runs in UTC; comments show the UTC+7 (Asia/Ho_Chi_Minh) local time. + - cron: '0 17 * * *' # 00:00 UTC+7 - cron: '0 22 * * *' # 05:00 UTC+7 - cron: '0 3 * * *' # 10:00 UTC+7 - cron: '0 8 * * *' # 15:00 UTC+7 diff --git a/README.md b/README.md index 6083048..d11d5ef 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Schedule (UTC+7, `Asia/Ho_Chi_Minh`): | Local time | UTC cron | | ---------- | ------------- | +| 00:00 | `0 17 * * *` | | 05:00 | `0 22 * * *` | | 10:00 | `0 3 * * *` | | 15:00 | `0 8 * * *` | @@ -13,6 +14,23 @@ Schedule (UTC+7, `Asia/Ho_Chi_Minh`): Manual `workflow_dispatch` is supported with an optional `text` input for ad-hoc runs. +## Customize the schedule + +GitHub Actions requires the cron list to be **literal** in the workflow file — it cannot be read from secrets, repo variables, or inputs. To change when the routine fires, edit `.github/workflows/trigger-routine.yml` and update the `on.schedule` block: + +```yaml +on: + schedule: + - cron: '0 17 * * *' # 00:00 UTC+7 + # add / remove / edit these lines as needed +``` + +Tips: +- Cron runs in **UTC**. Convert your local time: `UTC = local − offset` (e.g. 09:00 UTC+7 → 02:00 UTC → `0 2 * * *`). +- Validate expressions at . +- Schedules only activate on the default branch after the file is pushed. +- GitHub scheduled runs can lag 5–15 min under load; don't pack crons tightly. + ## Setup 1. Create a routine at (requires a Pro/Max/Team/Enterprise plan with Claude Code on the web enabled).