Skip to main content

Cron Jobs

PrismCronScheduler runs tasks on a schedule using standard 5-field cron expressions. Clean up old data every night, send reports every Monday, refresh caches every 5 minutes — all from within your Swift server.

Quick Start

Schedule a Job

Cron Expression Format

Supported Syntax

Common Schedules

Schedule Examples

Managing Jobs

Manage Scheduled Jobs

Practical Example: Report Generator

Weekly Report

Using Cron Expressions Directly

Parse and inspect cron expressions without the scheduler:
Parse Cron Expression
The scheduler checks every 60 seconds. Jobs won’t fire more precisely than once per minute. If a job takes longer than a minute, the next check might fire it again — keep handlers idempotent or add a lock.
Start the scheduler after your server is fully configured. Stop it during graceful shutdown to prevent jobs from running while the server is draining connections.