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.Documentation Index
Fetch the complete documentation index at: https://ryvn.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Jobs run as Kubernetes CronJobs under the hood, providing reliable scheduling and execution with built-in retry mechanisms.
Installation configuration
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.CronJob configuration
Configure scheduling and concurrency behavior:Schedule (optional)
Theschedule 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.
Concurrency policy
TheconcurrencyPolicy 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.
Advanced CronJob settings (optional)
Additional settings to fine-tune your job scheduling behavior:- Sets the deadline in seconds for starting the job if it misses its scheduled time
- Useful for jobs that shouldn’t run if they’re too late (e.g., time-sensitive reports)
- If not set, jobs will run regardless of how late they are
successfulJobsHistoryLimit: Number of completed successful jobs to retain (default: 3)failedJobsHistoryLimit: Number of completed failed jobs to retain (default: 1)- Helps manage cluster resources by automatically cleaning up old job pods
- Set to 0 to disable history retention
- Set to
trueto temporarily pause job scheduling without deleting the CronJob - Useful for maintenance windows or debugging
- Jobs won’t run while suspended, but the schedule remains configured
Resource management (required)
Define compute resources to ensure your jobs have sufficient capacity:Environment variables
Jobs support the same environment variable configuration as servers. Define environment-specific configuration and secrets:Complete configuration example
Here’s a comprehensive example of a job service with its installations:Build configuration
Jobs support the same build configurations as servers:Building from source
Using pre-built images
Advanced configuration example
Here’s an example using the advanced CronJob settings for a production-critical job that needs careful history management and deadline control:- Jobs won’t pile up if one runs long (Forbid policy)
- Stale jobs are skipped if system was down (startingDeadlineSeconds)
- Sufficient history retained for troubleshooting and audit
- Can be temporarily suspended without deletion if needed
Common use cases
Database maintenance
Data processing
Report generation
Cleanup tasks
Monitoring and debugging
Viewing job executions
Monitor your job executions through the Ryvn platform:- Navigate to your job service
- Click on the installation
- View the CronJob resource in the Explorer
- Check individual job run status and logs
Logs
Access logs from job executions through the Logs tab. Each job run creates a new pod with its own log stream.Metrics
Monitor job performance and success rates through the Metrics tab:- Job execution duration
- Success/failure rates
- Resource utilization during runs
Managing job lifecycle
Manual-only jobs
To create a job that only runs when manually triggered, simply omit theschedule field:
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
Running jobs on-demand
Any job — whether scheduled or manual-only — can be triggered immediately using Run Now:- Platform UI: Open the job installation and click Run Now in the Actions dropdown
- CLI:
ryvn command trigger-job --environment <env> --installation <name>
Suspending jobs
You can temporarily suspend a scheduled job without deleting it by settingsuspend: true:
- 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
suspend: false and redeploy.
Best practices
- Set appropriate timeouts: Ensure your job completes within reasonable time to avoid blocking subsequent runs
- Handle failures gracefully: Implement proper error handling and cleanup in your job code
- Use Forbid concurrency policy: Unless you specifically need concurrent runs
- Monitor resource usage: Adjust resource limits based on actual usage patterns
- Test schedule expressions: Verify your cron expressions before deploying to production
- Implement idempotency: Ensure jobs can be safely re-run without side effects
- Use maintenance windows: Coordinate job schedules with maintenance windows
- Configure history limits: Balance between debugging needs and resource usage
- Set startingDeadlineSeconds: For time-sensitive jobs that shouldn’t run if too late
- Use suspend instead of delete: When temporarily disabling jobs to preserve configuration
Limitations
- Jobs cannot expose network endpoints (use servers for HTTP services)
- Maximum job execution time is limited by cluster policies (typically 6 hours)
- Cron schedules have minute-level precision (no second-level scheduling)
- Jobs run in UTC timezone by default