Create durable background tasks for AI agents with automatic retries, queuing, and scheduling. Designed for developers building reliable asynchronous workflows and integrations.
$ npx skills add https://github.com/triggerdotdev/skills --skill trigger-tasksTrigger.dev Tasks enable developers to build reliable asynchronous workflows and background jobs with automatic retry logic, queuing, and concurrency control. The skill supports task creation with input validation via Zod schemas, batch triggering, and inter-task communication through trigger-and-wait patterns. Built-in features include debouncing, idempotency, error handling, cron-based scheduling, and real-time progress tracking via metadata. This is essential for AI agents that need long-running execution, webhook processing, file uploads, or recurring scheduled work without blocking main applications.
Install the skill by running the command in your terminal.
Creating background jobs or async workflows
Building AI agents with long-running tasks
Processing webhooks, emails, or file uploads
Scheduling recurring tasks using cron
$ npx skills add https://github.com/triggerdotdev/skills --skill trigger-tasksgit clone https://github.com/triggerdotdev/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Set up a durable background task for [COMPANY]'s [INDUSTRY] workflow that processes [DATA] with automatic retries and scheduling. Configure the task to run every [FREQUENCY] starting at [START_TIME] with exponential backoff for failures. Include a callback to [CALLBACK_ENDPOINT] upon completion or failure. Use the following parameters: priority=[PRIORITY_LEVEL], max_retries=[MAX_RETRIES], timeout=[TIMEOUT_SECONDS].
# Background Task Created: `process_inventory_20240515` **Status**: Queued (Ready to execute) **Schedule**: Every 24 hours at 02:00 UTC **Data Source**: `inventory_api_v2` (JSON) **Priority**: High **Retries**: 5 (Exponential backoff: 1s, 2s, 4s, 8s, 16s) **Timeout**: 300 seconds **Callback**: POST `https://[COMPANY].com/api/tasks/callback` ### Execution Plan 1. **Fetch Data**: Pull inventory from `inventory_api_v2` at 02:00 UTC. 2. **Process**: Validate SKUs, update stock levels, and flag low-stock items. 3. **Notify**: Send summary to Slack channel `#inventory-updates`. 4. **Retry Logic**: If API fails, retry with exponential backoff (max 5 attempts). 5. **Timeout**: Abort after 300s if processing stalls. ### Next Steps - Monitor via `GET /api/tasks/process_inventory_20240515/status`. - Adjust retries to 3 if API stability improves. - Add email alerts for failures after 3 retries. --- *Task ID: `a1b2c3d4-5678-90ef-ghij-klmnopqrstuv`*
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan