public final class JobScheduleBuilderImpl extends Object implements JobBuilder.ScheduleBuilder
Constructor and Description |
---|
JobScheduleBuilderImpl(String topic,
Map<String,Object> properties,
String name,
JobSchedulerImpl jobScheduler) |
Modifier and Type | Method and Description |
---|---|
ScheduledJobInfo |
add()
Finally add the job to the schedule
|
ScheduledJobInfo |
add(List<String> errors)
Finally add the job to the schedule
|
JobBuilder.ScheduleBuilder |
at(Date date)
Schedule the job for a specific date.
|
JobBuilder.ScheduleBuilder |
cron(String expression)
Schedule the job for according to the cron expression.
|
JobBuilder.ScheduleBuilder |
daily(int hour,
int minute)
Schedule the job daily at the given time.
|
JobBuilder.ScheduleBuilder |
hourly(int minute)
Schedule the job hourly at the given minute.
|
JobBuilder.ScheduleBuilder |
monthly(int day,
int hour,
int minute)
Schedule the job monthly, the time needs to be specified in addition.
|
JobBuilder.ScheduleBuilder |
suspend()
Suspend this scheduling by default.
|
JobBuilder.ScheduleBuilder |
weekly(int day,
int hour,
int minute)
Schedule the job weekly, the time needs to be specified in addition.
|
JobBuilder.ScheduleBuilder |
yearly(int month,
int day,
int hour,
int minute)
Schedule the job yearly, the time needs to be specified in addition.
|
public JobBuilder.ScheduleBuilder weekly(int day, int hour, int minute)
JobBuilder.ScheduleBuilder
weekly
in interface JobBuilder.ScheduleBuilder
day
- Day of the week, 1:Sunday, 2:Monday, ... 7:Saturday.hour
- Hour of the day ranging from 0 to 23.minute
- Minute of the hour ranging from 0 to 59.public JobBuilder.ScheduleBuilder daily(int hour, int minute)
JobBuilder.ScheduleBuilder
daily
in interface JobBuilder.ScheduleBuilder
hour
- Hour of the day ranging from 0 to 23.minute
- Minute of the hour ranging from 0 to 59.public JobBuilder.ScheduleBuilder hourly(int minute)
JobBuilder.ScheduleBuilder
hourly
in interface JobBuilder.ScheduleBuilder
minute
- Between 0 and 59.public JobBuilder.ScheduleBuilder at(Date date)
JobBuilder.ScheduleBuilder
at
in interface JobBuilder.ScheduleBuilder
date
- The datepublic JobBuilder.ScheduleBuilder monthly(int day, int hour, int minute)
JobBuilder.ScheduleBuilder
monthly
in interface JobBuilder.ScheduleBuilder
day
- Day of the month from 1 to 28.hour
- Hour of the day ranging from 0 to 23.minute
- Minute of the hour ranging from 0 to 59.public JobBuilder.ScheduleBuilder yearly(int month, int day, int hour, int minute)
JobBuilder.ScheduleBuilder
yearly
in interface JobBuilder.ScheduleBuilder
month
- Month of the year from 1 to 12.day
- Day of the month from 1 to 28.hour
- Hour of the day ranging from 0 to 23.minute
- Minute of the hour ranging from 0 to 59.public JobBuilder.ScheduleBuilder cron(String expression)
JobBuilder.ScheduleBuilder
cron
in interface JobBuilder.ScheduleBuilder
expression
- The cron expressionpublic ScheduledJobInfo add()
JobBuilder.ScheduleBuilder
add
in interface JobBuilder.ScheduleBuilder
null
otherwise.public ScheduledJobInfo add(List<String> errors)
JobBuilder.ScheduleBuilder
add
in interface JobBuilder.ScheduleBuilder
errors
- Optional list which will be filled with error messages.null
otherwise.public JobBuilder.ScheduleBuilder suspend()
JobBuilder.ScheduleBuilder
suspend
in interface JobBuilder.ScheduleBuilder
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.