Background Jobs
Production-grade background job scheduling with cron expressions, intervals, automatic retries, circuit breakers, and distributed system support. Zero dependencies required.
On this page
Background Jobs That Just Work
Schedule jobs with cron expressions or intervals.
Automatic retries, circuit breakers, and distributed system support included.
It's This Simple
Schedule background jobs
typescript
Why Background Jobs Matter
Without proper job scheduling, you're manually managing cron tasks, handling failures, and dealing with distributed systems. With MoroJS, you get all of that automatically.
Traditional job scheduling requires external services and complex setup. We handle that automatically.
Without Job System
- •External cron services required
- •Manual retry logic
- •No circuit breakers
- •Complex distributed coordination
With MoroJS
- •Built-in job scheduler
- •Automatic retries with backoff
- •Per-job circuit breakers
- •Leader election for clusters
It's This Easy
Schedule jobs with cron expressions or intervals. That's it.
Cron expressions and intervals
typescript
Why It Makes Sense
Production-Ready
Automatic retries, circuit breakers, timeouts, and memory leak detection.
Distributed
Leader election, Kubernetes awareness, and cluster mode support.
Zero Dependencies
Built-in scheduler. No external services required.
How It Works
MoroJS includes a production-grade job scheduler that supports cron expressions, interval-based scheduling, automatic retries with exponential backoff, circuit breakers, and distributed system coordination. Jobs can be scheduled with simple cron expressions or interval strings, and the system handles execution, retries, and failure recovery automatically.
Quick Start
Basic Job Scheduling
typescript
Schedule Formats
typescript
Advanced Features
Job Management
typescript
Priority Queue and Concurrency Control
typescript
Circuit Breaker
typescript
Leader Election (Distributed Systems)
typescript
Job Metrics and Monitoring
typescript
Production-Ready Features
Production-Ready Resilience
- Automatic retries with exponential backoff
- Per-job circuit breakers
- Timeout enforcement
- Memory leak detection
- Graceful shutdown
Distributed Systems
- Leader election (file or Redis)
- Kubernetes awareness
- Cluster mode support
- Crash recovery
- Full observability & metrics