Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.zopio.dev/llms.txt

Use this file to discover all available pages before exploring further.

jobs Command

The jobs command helps you create and manage background jobs in your zopio application.

Usage

zopio jobs [options]

Options

  • -l, --list - List all registered jobs
  • -c, --create <name> - Create a new job
  • -t, --trigger <jobId> - Manually trigger a job
  • -s, --schedule <cron> - Set job schedule (cron expression)

Examples

zopio jobs --create user-notifications

Job Types

The Zopio CLI supports three types of background jobs:

Cron Jobs

Scheduled jobs that run on a regular basis using cron expressions.
zopio jobs --create <name> --schedule "<cron-expression>"
Example: (run every day at midnight)
zopio jobs --create daily-cleanup --schedule "0 0 * * *"

Queue Jobs

Jobs that process items from a queue.
zopio jobs --create <name> --type queue
Example:
zopio jobs --create email-processor --type queue

Worker Jobs

Long-running worker processes.
zopio jobs --create <name> --type worker
Example:
zopio jobs --create data-syncer --type worker

Internationalization Support

All jobs created with the jobs command have built-in internationalization support. Job names, descriptions, and log messages can be translated into all configured languages. Example job structure with i18n support:
jobs/
├─ user-notifications/
│  ├─ index.ts
│  ├─ handler.ts
│  └─ i18n/
│     ├─ en.json
│     └─ tr.json
└─ config.ts