nodejsagenda
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "nodejsagenda":https://skillpi.com/zh/skills/deepskill-818a6acd4316ff4956ee8b34a954f543eeaa2e08274f9334975eed6475a6091c。安装前核对上游来源和版本:https://skillhub.cn/skills/user_3c6cb52e/run-durable-scheduled-agent-jobs-in-node-js-with-agenda。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
skillhub.cn
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
当需要持久化计划任务、重试机制、锁定功能以及由 MongoDB、PostgreSQL 或 Redis 支持的后台工作进程时,请使用 Agenda,而不是脆弱的进程内定时器。
介绍来源: third_party · user_3c6cb52e · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- 当需要持久化计划任务、重试机制、锁定功能以及由MongoDB、PostgreSQL或Redis支持的后台工作进程时,请使用Agenda,而不是脆弱的进程内定时器。
- 软件、账号及付费要求
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: "在 Node.js 中使用 Agenda 运行持久化的计划代理作业"
slug: "run-durable-scheduled-agent-jobs-in-node-js-with-agenda"
version: "1.0.0"
displayName: "使用 Agenda 在 Node.js 中运行持久化的计划代理作业"
summary: "当需要持久化计划任务、重试机制、锁定功能以及由MongoDB、PostgreSQL或Redis支持的后台工作进程时,请使用Agenda,而不是脆弱的进程内定时器。"
license: "MIT"
description: "当需要持久化计划任务、重试机制、锁定功能以及由MongoDB、PostgreSQL或Redis支持的后台工作进程时,请使用Agenda,而不是脆弱的进程内定时器。"
github_stars: 9677
verification: "security_reviewed"
source: "https://github.com/1991513ccie-png/skills"
author: "1991513ccie-png"
publisher_type: "individual"
category: "Templates & Workflows"
framework: "Custom Agents"
tool_ecosystem:
github_repo: "1991513ccie-png/skills"
github_stars: 9677
npm_package: "agenda"
npm_weekly_downloads: 167228在 Node.js 中使用 Agenda 运行持久化的计划代理作业
Use Agenda when a custom Node.js agent needs persistent scheduled jobs, retries, locking, and background workers backed by MongoDB, PostgreSQL, or Redis instead of fragile in-process timers.
Prerequisites
Node.js, the agenda npm package, and a supported persistence backend such as MongoDB, PostgreSQL, or Redis.
Installation
Use the upstream install or setup path that matches your environment:
- npm install agenda
- npm install @agendajs/mongo-backend
- npm install @agendajs/postgres-backend
- npm install @agendajs/redis-backend
Requirements and caveats from upstream:
- A light-weight job scheduling library for Node.js
- ESM-only - Modern ES modules (Node.js 18+)
- If your MongoDB deployment is a replica set (even a single-node replica set works), you can use MongoChangeStreamNotificationChannel for native real-time notifications without any external dependencies:
Basic usage or getting-started notes:
-
For MongoDB: Install the official MongoDB backend:
-
You will need a working MongoDB database (v4+).
-
For PostgreSQL: Install the official PostgreSQL backend:
-
Extracted from upstream docs: https://raw.githubusercontent.com/agenda/agenda/HEAD/README.md
Documentation
当前收录版本
1.0.0
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供 Node.js 中实现持久化计划任务的完整解决方案
- 支持 MongoDB、PostgreSQL、Redis 多种后端,适用性广
亮点
- 触发描述精准,明确区分了 Agenda 与进程内定时器的使用场景
待提升项
-
缺少端到端代码示例 原报告严重程度:轻微
文档未提供完整的代码示例来展示如何定义任务、调度任务和处理任务执行
改进建议:建议添加一个完整的端到端示例,包括任务定义、调度逻辑和错误处理
亮点
- 文档结构清晰,frontmatter 完整,包含必要的先决条件和安装说明
待提升项
-
缺少异常处理说明 原报告严重程度:轻微
未覆盖数据库连接失败、任务执行错误等常见异常场景的处理方案
改进建议:建议补充异常处理的最佳实践,特别是数据库连接和任务重试机制
亮点
- 工具来源明确,参数说明清晰,支持多种数据库后端
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
安装或获取外部依赖
使用官方来源并锁定版本,在隔离环境检查安装脚本。当前文档检查不覆盖后续下载的代码。
主文档提及 · 第 34, 35, 36, 37 行
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- agenda.github.io
- github.com
- raw.githubusercontent.com
- www.mongodb.com
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
翻译待完成,请参阅来源文档。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。