stacks-jobs

Create and manage background jobs with queue configuration and scheduling.

622|17|Updated Apr 26, 2022
One-click install
npx skills add https://github.com/stacksjs/stacks --skill stacks-jobs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stacks-jobs
Source: https://github.com/stacksjs/stacks/tree/main/.claude/skills/stacks-jobs
Command: npx skills add https://github.com/stacksjs/stacks --skill stacks-jobs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Background job development across Stacks apps requires a standardized structure, clear dispatch patterns, and reliable scheduling to ensure tasks run reliably and scalably.

Core Features & Use Cases

  • Define jobs in app/Jobs with properties like name, description, queue, tries, backoff, timeout, rate, and enabled.
  • Dispatch jobs using dispatch, dispatchIf, dispatchAfter, and dispatchNow to control timing and sequencing.
  • Schedule recurring tasks via rate-based scheduling (Every constants) and integrate with the scheduler for automated runs.

Quick Start

Create a new job under app/Jobs/ using the provided scaffold and implement its handle method.

Frequently Asked Questions about stacks-jobs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define and manage TypeScript background jobs?

TypeScript background jobs are defined as standard classes in the app/Jobs directory, exposing properties like queue, tries, backoff, timeout, and rate to manage execution behavior and scheduling.

What dispatching patterns are available for queueing background tasks?

Background task dispatching supports multiple patterns including dispatch, dispatchIf, dispatchAfter, and dispatchNow to control job timing, conditional execution, and sequencing within the queue system.

How does rate-based job scheduling work for recurring tasks?

Rate-based job scheduling uses predefined Every constants to configure recurring task intervals, integrating with the scheduler to automate runs without manual cron setup.

Can I configure retry and backoff strategies for failed queue jobs?

Failed queue jobs support configurable retry strategies using the tries and backoff properties defined directly on the Job class, allowing custom timeout and rate limits per task.

Does this background queue system require external dependencies?

The background queue system integrates natively with the stacks-queue system and requires no external dependencies, providing job scheduling and dispatching out of the box.

What is the best way to structure a Stacks background job?

The best way to structure a Stacks background job is using the provided scaffold under app/Jobs, implementing the handle method to define task logic alongside configuration properties.