Comprehensive guidance for background processing in the Mossback platform. Covers jobs, workers, queues, schedules, cron expressions, retries, backoff, dead letters, idempotency, concurrency limits, timeouts, job payloads, job priorities, long-running tasks, batch processing, and fan-out. Also covers how a job is defined, how it is enqueued from a request handler, how it is registered with the scheduler, how failures are surfaced, and how to replay a failed job safely. Helps with adding a new job, debugging a stuck queue, making a job safe to run twice, and moving slow work out of a request. Use when the user mentions a job, a worker, a queue, a schedule, cron, a retry, async work, a background task, a batch, or anything that should happen later or on a timer. Always follows the Mossback platform conventions, house style, and established best practices.
Jobs live in src/jobs/<name>.ts and are registered in src/jobs/index.ts.
The queue delivers at least once. Every job is safe to run twice.
Enqueue after the database transaction commits, never inside it.
Replay a dead job with pnpm jobs:replay <id>; it refuses jobs older than seven days.
1---2name: background-jobs3description: Comprehensive guidance for background processing in the Mossback platform. Covers jobs, workers, queues, schedules, cron expressions, retries, backoff, dead letters, idempotency, concurrency limits, timeouts, job payloads, job priorities, long-running tasks, batch processing, and fan-out. Also covers how a job is defined, how it is enqueued from a request handler, how it is registered with the scheduler, how failures are surfaced, and how to replay a failed job safely. Helps with adding a new job, debugging a stuck queue, making a job safe to run twice, and moving slow work out of a request. Use when the user mentions a job, a worker, a queue, a schedule, cron, a retry, async work, a background task, a batch, or anything that should happen later or on a timer. Always follows the Mossback platform conventions, house style, and established best practices.4metadata:5 source: https://skillmd.com/skills/tuyv/background-jobs6---78# Background Jobs910## Rules1112- Jobs live in `src/jobs/<name>.ts` and are registered in `src/jobs/index.ts`.13- The queue delivers at least once. Every job is safe to run twice.14- Enqueue after the database transaction commits, never inside it.15- Replay a dead job with `pnpm jobs:replay <id>`; it refuses jobs older than seven days.
Run npx get-skill add tuyv/background-jobs in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Comprehensive guidance for background processing in the Mossback platform. Covers jobs, workers, queues, schedules, cron expressions, retries, backoff, dead letters, idempotency, concurrency limits, timeouts, job payloads, job priorities, long-running tasks, batch processing, and fan-out. Also covers how a job is defined, how it is enqueued from a request handler, how it is registered with the scheduler, how failures are surfaced, and how to replay a failed job safely. Helps with adding a new job, debugging a stuck queue, making a job safe to run twice, and moving slow work out of a request. Use when the user mentions a job, a worker, a queue, a schedule, cron, a retry, async work, a background task, a batch, or anything that should happen later or on a timer. Always follows the Mossback platform conventions, house style, and established best practices. It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tuyv (@tuyv) published this skill. Their other Agent Skills are listed on their SkillMD profile.