Deploy and manage scheduled and manual jobs on Ryvn
Jobs are scheduled or on-demand tasks that run to completion, perfect for maintenance, backups, and periodic processing
needs. Unlike servers, jobs execute on a
schedule or manual trigger, complete their task, and terminate. They integrate with
maintenance windows for coordinated operations.
Jobs run as Kubernetes CronJobs under the hood, providing reliable scheduling and execution with built-in retry mechanisms.
When you deploy a job service to an environment, it creates an installation. Each installation can run on a cron
schedule, be triggered manually via Run Now, or both.
The schedule field uses standard cron expression format to define when the job runs.
When omitted, the job is deployed as a manual-only job that never runs automatically
and can only be triggered via the Run Now button in the UI or the trigger-job CLI command.
# Every 5 minutesschedule: "*/5 * * * *"# Every hour at minute 0schedule: "0 * * * *"# Daily at midnightschedule: "0 0 * * *"# Every Monday at 2 AMschedule: "0 2 * * 1"# First day of each month at midnightschedule: "0 0 1 * *"# Every weekday at 9 AMschedule: "0 9 * * 1-5"
The concurrencyPolicy field controls how the job handles overlapping runs. Defaults to Forbid.
Allow: Allows concurrent job runs. Multiple instances can run simultaneously.
Forbid: Skips new run if previous job is still running (default recommendation).
Replace: Cancels the currently running job and starts a new one.
Choose Forbid for most use cases to prevent resource contention and data consistency issues. Only use Allow when
your job logic explicitly handles concurrent execution safely.
Define compute resources to ensure your jobs have sufficient capacity:
config: | schedule: "0 * * * *" concurrencyPolicy: Forbid resources: requests: cpu: "100m" # Minimum CPU (100 millicores) memory: "128Mi" # Minimum memory limits: cpu: "1" # Maximum CPU (1 core) memory: "1Gi" # Maximum memory
Set resource requests based on your job’s typical usage and limits based on maximum expected usage. This ensures
your job gets scheduled reliably while preventing resource exhaustion.
Manual-only jobs are deployed as suspended CronJobs and will never run automatically. They can only
be executed via the Run Now button in the platform UI or the trigger-job CLI command.This is useful for:
Database migrations: Run once when needed, not on a schedule
Data backfills: Trigger manually after deploying a new feature
Incident response: Run a repair job only when needed
Ad-hoc processing: Tasks that don’t have a predictable schedule
This creates a one-off Job from the CronJob’s template. The new run appears alongside any scheduled
runs in the resource explorer and follows the same concurrency policy, retry, and history settings.
You can temporarily suspend a scheduled job without deleting it by setting suspend: true:
config: | schedule: "0 * * * *" concurrencyPolicy: Forbid suspend: true # Job won't run until set back to false
This is useful for:
Planned maintenance: Suspend jobs during database upgrades
Debugging: Pause execution while investigating issues
Cost control: Temporarily disable non-critical jobs
Testing: Prevent jobs from running in staging environments
To resume a suspended job, simply update the configuration setting suspend: false and redeploy.
To make a scheduled job temporarily manual-only, you can set suspend: true and use Run Now when needed.
Alternatively, remove the schedule field entirely to make it permanently manual-only.