Package org.jobrunr.jobs
Class RecurringJob
java.lang.Object
org.jobrunr.jobs.AbstractJob
org.jobrunr.jobs.RecurringJob
- All Implemented Interfaces:
Lockable
- Direct Known Subclasses:
RecurringJobUIModel
-
Constructor Summary
ConstructorDescriptionRecurringJob
(String id, JobDetails jobDetails, String scheduleExpression, String zoneId) RecurringJob
(String id, JobDetails jobDetails, String scheduleExpression, String zoneId, String createdAt) RecurringJob
(String id, JobDetails jobDetails, Schedule schedule, ZoneId zoneId) RecurringJob
(String id, JobDetails jobDetails, Schedule schedule, ZoneId zoneId, Instant createdAt) -
Method Summary
Modifier and TypeMethodDescriptiongetId()
getNextRun
(Instant sinceInstant) Returns the next job to for this recurring job based on the current instant.toScheduledJobs
(Instant from, Instant upTo) Creates all jobs that must be scheduled between the given start and end time.toString()
Methods inherited from class org.jobrunr.jobs.AbstractJob
getAmountOfRetries, getJobDetails, getJobName, getJobSignature, getLabels, getVersion, lock, setAmountOfRetries, setJobName, setLabels
-
Constructor Details
-
RecurringJob
-
RecurringJob
-
RecurringJob
public RecurringJob(String id, JobDetails jobDetails, String scheduleExpression, String zoneId, String createdAt) -
RecurringJob
public RecurringJob(String id, JobDetails jobDetails, Schedule schedule, ZoneId zoneId, Instant createdAt)
-
-
Method Details
-
getId
- Specified by:
getId
in classAbstractJob
-
getScheduleExpression
-
toScheduledJob
Returns the next job to for this recurring job based on the current instant.- Returns:
- the next job to for this recurring job based on the current instant.
-
toScheduledJobs
Creates all jobs that must be scheduled between the given start and end time.- Parameters:
from
- the start time from which to create Scheduled JobsupTo
- the end time until which to create Scheduled Jobs- Returns:
- creates all jobs that must be scheduled
-
toEnqueuedJob
-
getZoneId
-
getCreatedAt
-
getNextRun
-
getNextRun
-
toString
-