Class CronScheduler
- java.lang.Object
-
- jetbrains.buildServer.buildTriggers.scheduler.CronScheduler
-
- All Implemented Interfaces:
SchedulingPolicy
public class CronScheduler extends Object implements SchedulingPolicy
Cron-based scheduler
-
-
Constructor Summary
Constructors Constructor Description CronScheduler(String expression)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getDescription()
String
getExpression()
Map<CronField,String>
getFieldToValue()
static Map<CronField,String>
getFieldToValue(String expression)
long
getScheduledTime(long time)
Computes next time for the trigger relative to the time specified in param.String
getTimeZone()
int
hashCode()
boolean
isDaily()
String
toString()
-
-
-
Constructor Detail
-
CronScheduler
public CronScheduler(@NotNull String expression) throws CronParseException
- Throws:
CronParseException
-
-
Method Detail
-
getFieldToValue
@NotNull public static Map<CronField,String> getFieldToValue(@NotNull String expression)
-
getScheduledTime
public long getScheduledTime(long time)
Description copied from interface:SchedulingPolicy
Computes next time for the trigger relative to the time specified in param.- Specified by:
getScheduledTime
in interfaceSchedulingPolicy
- Parameters:
time
- relative moment in time- Returns:
java time
for next event or-1
if there would be no more events
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceSchedulingPolicy
-
getExpression
@NotNull public String getExpression()
-
getTimeZone
@Nullable public String getTimeZone()
-
isDaily
public boolean isDaily()
-
-