922a57fe34
Self-hosted 開源:WASM 零件 + recipe + cypher-executor,跑在你自己的 Cloudflare。 此為重建的乾淨歷史起點(移除曾誤 commit 的 GCP SA 金鑰,舊歷史保留在 richblack/arcrun 與本地 backup 分支)。含: - acr init --self-hosted installer(建 KV/R2 + codeload 拉預編譯 wasm + wrangler deploy + seed recipe) - recipe push 把關(資料外流提醒 + 打通檢查) - 19 個正當零件預編譯 wasm(claude_api/km_writer/kbdb_upsert_block 排除:違反 DECISIONS §1) - CLI / cypher-executor / registry / 完整 SDD Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
canonical_id: "cron"
|
|
display_name: "定時排程"
|
|
category: "logic"
|
|
version: "v1"
|
|
wasi_target: "preview1"
|
|
stability: "floating"
|
|
runtime_compat:
|
|
- "cf-workers"
|
|
- "workerd"
|
|
- "wazero"
|
|
constraints:
|
|
max_size_kb: 2048
|
|
max_cold_start_ms: 50
|
|
no_network_syscall: true
|
|
no_filesystem_syscall: true
|
|
io_model: "stdin_stdout_json"
|
|
input_schema:
|
|
type: object
|
|
required: [cron_expr]
|
|
properties:
|
|
cron_expr:
|
|
type: string
|
|
description: 標準 5 欄位 cron expression,如 0 9 * * *
|
|
description:
|
|
type: string
|
|
output_schema:
|
|
type: object
|
|
properties:
|
|
success:
|
|
type: boolean
|
|
data:
|
|
type: object
|
|
properties:
|
|
cron_id:
|
|
type: string
|
|
cron_expr:
|
|
type: string
|
|
enabled:
|
|
type: boolean
|
|
description:
|
|
type: string
|
|
gherkin_tests:
|
|
- scenario: "有效 cron expression"
|
|
given: '{"cron_expr":"0 9 * * *","description":"每天早上9點"}'
|
|
then_contains: '"enabled":true'
|
|
- scenario: "無效 cron expression(欄位數不對)"
|
|
given: '{"cron_expr":"0 9 * *"}'
|
|
then_contains: '{"success":false'
|
|
- scenario: "缺少 cron_expr"
|
|
given: '{}'
|
|
then_contains: '{"success":false'
|
|
tags: [builtin, cron, schedule, trigger, timer]
|
|
description: "驗證 cron expression 格式並回傳 cron_id。實際排程由 Cypher Executor 負責。"
|
|
config_example: |
|
|
my_cron: # 節點名稱(可自訂)
|
|
cron_expr: "0 9 * * *" # 標準 5 欄位 cron 表達式(必填),如:每天早上 9 點
|
|
description: "每天早上9點執行" # 排程說明文字(選填)
|