mirror of
https://github.com/tiennm99/claude-code-routine-trigger.git
synced 2026-06-08 16:15:33 +00:00
feat: add 00:00 UTC+7 schedule and document how to customize cron
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 <https://crontab.guru/>.
|
||||
- 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 <https://claude.ai/code/routines> (requires a Pro/Max/Team/Enterprise plan with Claude Code on the web enabled).
|
||||
|
||||
Reference in New Issue
Block a user