Proletarian supports delayed job execution natively through two options onDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/msolli/proletarian/llms.txt
Use this file to discover all available pages before exploring further.
job/enqueue!. You can schedule a job for a specific point in time, or specify a duration to wait before the job becomes eligible for processing.
The :process-at option
Pass :process-at with a java.time.Instant to schedule a job for a specific moment in time. The queue worker will not pick up the job before that instant:
Instant you provide is already in the past, the job is scheduled for immediate processing.
The :process-in option
Pass :process-in with a java.time.Duration to delay execution relative to the current time. Proletarian adds the duration to the current clock time to compute the effective process-at value:
Precedence and defaults
- If both
:process-atand:process-inare provided,:process-attakes precedence and:process-inis ignored. - If neither is provided, the job is enqueued for immediate processing (its
process-atis set to the current time).
Complete examples
The
:process-at time is a minimum delay, not a guarantee. A job scheduled for time T will not be picked up before T, but the actual execution time may be later depending on the queue worker’s polling interval, the number of jobs ahead in the queue, and available worker threads.