cron-guardrails-pack
Author: Billy (SAPCONET)
Purpose
Provide quick lint + checklist guardrails for cron entries and notification discipline (
NO_REPLY).
What this skill includes
- -
scripts/cron-lint.py: static checks for cron entry lines.
Checks performed
- - Cron schedule must contain exactly 5 fields.
- Rejects known bad model names (for example:
haiku-4-6). - Flags jobs that appear to announce/message but do not include
NO_REPLY.
Usage
Lint a cron file:
CODEBLOCK0
Lint stdin:
CODEBLOCK1
Exit codes:
- -
0: no issues - INLINECODE5 : one or more issues found
- INLINECODE6 : usage or read error
NO_REPLY checklist
- - Announce/inbox/notify-style jobs should explicitly include
NO_REPLY in payload or message body. - Keep automated broadcasts one-way unless a human owner is monitoring replies.
- Include owner and purpose in command comments.
Example cron payload snippet
CODEBLOCK2
cron-guardrails-pack
作者:Billy (SAPCONET)
目的
为cron条目和通知规范(NO_REPLY)提供快速lint检查+清单护栏。
本技能包含的内容
- - scripts/cron-lint.py:对cron条目行进行静态检查。
执行的检查项
- - Cron调度必须恰好包含5个字段。
- 拒绝已知的不良模型名称(例如:haiku-4-6)。
- 标记那些看似发送/通知但未包含NO_REPLY的任务。
使用方法
对cron文件进行lint检查:
bash
python3 scripts/cron-lint.py /path/to/crontab.txt
对标准输入进行lint检查:
bash
cat /path/to/crontab.txt | python3 scripts/cron-lint.py -
退出码:
- - 0:无问题
- 1:发现一个或多个问题
- 2:使用或读取错误
NO_REPLY检查清单
- - 通知/收件箱/提醒类任务应在负载或消息体中明确包含NO_REPLY。
- 保持自动广播为单向通信,除非有真人所有者监控回复。
- 在命令注释中包含所有者和用途。
cron负载示例片段
cron
/15 * /usr/local/bin/send-inbox --channel ops --tag NOREPLY --message NOREPLY | cron heartbeat