Class CronTriggerBuilder<T extends Serializable>
java.lang.Object
org.sterl.spring.persistent_tasks.api.CronTriggerBuilder<T>
Fluent builder for creating scheduled (recurring) triggers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the schedule using a fixed interval after each invocation.build()Sets the schedule using a cron expression.Sets the unique ID for this scheduled trigger.priority(int priority) Sets the priority for created triggers (higher = more important).Sets a fixed state for all trigger executions.stateProvider(Supplier<T> stateProvider) Sets a state provider that's called for each trigger execution.Sets a custom tag for created triggers.
-
Constructor Details
-
CronTriggerBuilder
public CronTriggerBuilder()
-
-
Method Details
-
id
Sets the unique ID for this scheduled trigger. If not set, defaults toSchedule.description(). -
state
Sets a fixed state for all trigger executions. -
stateProvider
Sets a state provider that's called for each trigger execution. Useful for dynamic state generation. -
cron
Sets the schedule using a cron expression.- Parameters:
cronExpression- cron expression (6 fields: second minute hour day month weekday)
-
after
Sets the schedule using a fixed interval after each invocation.- Parameters:
interval- duration between executions
-
tag
Sets a custom tag for created triggers. -
priority
Sets the priority for created triggers (higher = more important). -
build
-