quest
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseQuest — Background Job Scheduling
Quest — 后台任务调度
Quest is a job scheduling hook for Sails.js that turns scripts in the directory into scheduled background jobs. Each job runs as an isolated child process via , with full access to models, helpers, and configuration.
scripts/sails runQuest是一款面向Sails.js的任务调度钩子,它能将目录下的脚本转换为可调度的后台任务。每个任务都会通过以独立子进程的方式运行,并且可以完全访问模型、助手和配置。
scripts/sails runWhen to Use
使用场景
Use this skill when:
- Creating background jobs or scheduled tasks
- Setting up cron schedules, recurring intervals, or one-time delayed execution
- Defining job scripts with inputs and overlap prevention
- Using the API to manage jobs at runtime
sails.quest - Listening to job lifecycle events (start, complete, error)
- Configuring the console environment for lightweight job execution
在以下场景中使用该技能:
- 创建后台任务或定时任务
- 设置cron调度、重复执行间隔或一次性延迟执行
- 定义包含输入参数和防止重叠的任务脚本
- 使用API在运行时管理任务
sails.quest - 监听任务生命周期事件(启动、完成、错误)
- 配置控制台环境以实现轻量型任务执行
Rules
规则说明
Read individual rule files for detailed explanations and code examples:
- rules/getting-started.md - What Quest is, installation, project structure, quick start
- rules/scheduling.md - Cron, human-readable intervals, shorthand, later.js, one-time execution
- rules/job-definition.md - Script anatomy, inputs, overlap prevention, config-defined jobs
- rules/api.md - API reference: control, info, events
sails.quest - rules/patterns.md - Common job patterns with complete script examples
阅读各个规则文件以获取详细解释和代码示例:
- rules/getting-started.md - 什么是Quest、安装方法、项目结构、快速入门
- rules/scheduling.md - Cron表达式、易读的时间间隔、简写方式、later.js、一次性执行
- rules/job-definition.md - 脚本结构、输入参数、防止重叠、配置定义的任务
- rules/api.md - API参考:控制、信息、事件
sails.quest - rules/patterns.md - 常见任务模式及完整脚本示例