Files
tiennm99 186b428b67 fix(cron): use empty crons=[] to actually clear CF dashboard
Commenting out [triggers] left stale schedules visible in the CF
dashboard — Wrangler only pushes declared config, never removes
implicitly. An empty array is the explicit "clear schedules" signal.

Sample schedule preserved as a comment above the empty array so
re-enabling is a single-line edit.
2026-05-09 13:14:46 +07:00

41 lines
1.4 KiB
TOML

name = "claude-code-routine-trigger-worker"
main = "worker.js"
compatibility_date = "2026-05-09"
compatibility_flags = ["nodejs_compat"]
# Plain (non-secret) vars. Override per-environment in the dashboard or via
# `wrangler.toml` env blocks. Secrets go through `wrangler secret put`.
[vars]
TEXT_TEMPLATE = "Scheduled trigger at {LocalTime}"
TZ = "Asia/Ho_Chi_Minh"
# Cron triggers fire from this list. CF Workers requires literal cron
# expressions here — they cannot be loaded from env vars or secrets.
#
# DISABLED: this worker is parked. I migrated this routine to cron-job.org
# to keep my CF cron-trigger quota free for other workers (see README).
#
# `crons = []` (empty array) is REQUIRED to clear schedules from CF — just
# omitting/commenting the block leaves stale entries in the dashboard,
# because Wrangler only pushes what you declare.
#
# To re-enable: replace the empty array with your schedule (sample below)
# and `npx wrangler deploy`.
# crons = [
# "0 0-17,22-23 * * *", # UTC+7: 00:00 + 05:00..23:00 hourly
# ]
[triggers]
crons = []
# Workers Logs / traces. `head_sampling_rate = 1` keeps 100% of invocations
# (low volume here — ~20/day — so full retention is free). Drop to e.g. 0.1
# if traffic ever grows enough to matter.
[observability]
enabled = true
head_sampling_rate = 1
[observability.logs]
enabled = true
head_sampling_rate = 1
invocation_logs = true