# Plombery接入 Server酱：Python 任务调度结果微信通知（2026 教程）

> 在 Plombery 调度器中配置内置 Apprise，将 Python 定时任务的成功或失败通知推送到微信，只需一行 YAML 配置。

- 网页版：https://sct.ftqq.com/docs/integrations/plombery/
- 更新日期：2026-07-17

# Plombery + Server酱：Python 任务调度结果微信通知

> 效果：Plombery 调度的 Python 任务成功或失败时微信收到通知

## 前置条件

- 获取 Server酱 SendKey：登录 sct.ftqq.com，在「SendKey」页面复制（[30 秒获取教程](https://sct.ftqq.com/docs/getting-started/sendkey/)）
- 运行中的 Plombery 实例（其内置了 apprise 依赖）

## 配置步骤

在 Plombery 的配置中加入 `notifications` 字段，使用 `schan://` 协议拼接你的 SendKey：

```yaml
notifications:
  - apprise_url: schan://你的SENDKEY
```

`schan://` 是 Apprise 内置的 Server酱 Turbo 专用协议（底层调用 `https://sctapi.ftqq.com/你的SENDKEY.send`），SCT 开头的 SendKey 直接可用。

将此配置关联到你的任务即可。任务执行成功或失败时，Plombery 会自动触发通知。

**Server酱³（sctp 开头）用户**：Apprise 暂无 Server酱³ 专用插件，可用通用 `json://` 插件直连 push.ft07.com API，具体接法参考站内 [Apprise 接入 Server酱](https://sct.ftqq.com/docs/integrations/apprise/)。

**命令行自测**：配置 Plombery 前，可先在终端测试连通性：

```bash
pip install apprise && apprise -t "测试标题" -b "测试正文" "schan://你的SENDKEY"
```

## 在任务中启用通知

将 `notifications` 配置添加到你的 Plombery 任务定义中即可。例如：

```yaml
notifications:
  - apprise_url: schan://你的SENDKEY
```

具体任务定义格式（如任务 ID、调度规则等）请参考 Plombery 官方文档。

## 常见问题

**免费额度是多少？**

免费用户每天可发送 5 条消息，每分钟上限 50 条。订阅会员目前特价最低 3 元/月，一天最多可发 1000 条（[价格详情](https://sct.ftqq.com/subscribe)）。

**配置后没收到消息？**

先用命令行 `apprise -t "测试" -b "正文" "schan://你的SENDKEY"` 测试。若命令行正常但 Plombery 不发，检查 YAML 缩进及任务是否关联了通知；若均不通，参考[常见问题与排查](https://sct.ftqq.com/docs/getting-started/faq/)。

**sctp 开头的 SendKey 怎么配置？**

Apprise 暂无 Server酱³ 专用插件，需使用 `json://` 插件直连 API，具体参数参考站内 [Apprise 接入 Server酱](https://sct.ftqq.com/docs/integrations/apprise/)。

**可以推送到钉钉或飞书吗？**

可以，Server酱 支持推送到微信服务号、企业微信、钉钉、飞书等多个通道，详见[通道对比](https://sct.ftqq.com/docs/getting-started/channels/)。

## 相关集成

- [/integrations/python/](https://sct.ftqq.com/docs/integrations/python/) —— Python 脚本推送
- [/integrations/qinglong/](https://sct.ftqq.com/docs/integrations/qinglong/) —— 青龙面板任务通知
- [/integrations/uptime-kuma/](https://sct.ftqq.com/docs/integrations/uptime-kuma/) —— Uptime Kuma 宕机告警


## 懒人方案：把这段话复制给你的 AI 助手

把下面这段文字原样粘贴给 Claude Code、Cursor 或任何 AI 编程助手，它就会替你完成 Server酱 的接入：

```text
请帮我把 Server酱 微信通知接入到我当前的项目/工具中：
1. API：POST https://sctapi.ftqq.com/{SendKey}.send，参数 title（必填，不能含换行）、desp（正文，支持 Markdown，可选）；成功时返回 JSON 的 code 为 0。
2. 如果我的 SendKey 以 sctp 开头，则改用 https://{uid}.push.ft07.com/send/{SendKey}.send，uid 是 SendKey 中 sctp 与 t 之间的数字。
3. SendKey 从环境变量 SERVERCHAN_SENDKEY 读取；如果没有，提醒我到 https://sct.ftqq.com 免费获取（每天 5 条额度）。
4. 安全要求：不要把 SendKey 硬编码进代码、不要打印到日志、不要提交到 git。
5. 频率约定：任务结束发 1 条结果摘要即可，批量任务合并成一条，不要每步都推。
请根据我当前的项目和场景直接写好代码/配置并验证。
```

