Skip to main content
Job services are for scheduled or on-demand tasks that run to completion. They’re ideal for cron jobs, data processing, and one-time tasks. This is a complete reference for all fields that can be set for a job service in porter.yaml.

Field Reference


Basic Example


cron

string Optional A cron expression that defines when the job should run. Uses standard 5-field cron syntax.
If no cron expression is provided, the job will default to run every 5 minutes.

suspendCron

boolean Optional Disable the cron schedule without removing it. The job won’t run on schedule but can still be triggered manually.
Use this to pause scheduled jobs during maintenance windows or while debugging, or to create one-off jobs.

allowConcurrent

boolean Optional Allow multiple instances of the job to run simultaneously. By default, a new job run won’t start if a previous run is still in progress.
Be careful enabling this for jobs that modify shared resources. Concurrent runs may cause race conditions or data inconsistency.

timeoutSeconds

integer Optional Maximum number of seconds the job is allowed to run before being terminated.
If not specified, jobs may run indefinitely. It’s recommended to set a reasonable timeout for all jobs.

connections

array Optional Connect to external cloud services. See Connections Configuration for full documentation.

terminationGracePeriodSeconds

integer Optional Seconds to wait for graceful shutdown before forcefully terminating the job.
Use this to ensure jobs can clean up resources or checkpoint progress before termination.

gpuCoresNvidia

integer Optional Allocate NVIDIA GPU cores for ML training, inference, or GPU-accelerated processing.
Requires a node group with GPU-enabled instances.

Triggering Jobs Manually

Jobs can be triggered manually using the Porter CLI:

Complete Example


Common Use Cases

Database Cleanup

Data Export

ML Training Job

Health Check / Monitoring

Manual Migration Job

Jobs suspendCront: true must be triggered manually using porter app run --job.