Package hudson.scheduler
Class CronTabList
- java.lang.Object
-
- hudson.scheduler.CronTabList
-
-
Constructor Summary
Constructors Constructor Description CronTabList(Collection<CronTab> tabs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
check(Calendar cal)
Returns true if the given calendar matchesString
checkSanity()
Checks if this crontab entry looks reasonable, and if not, return an warning message.static CronTabList
create(String format)
static CronTabList
create(String format, Hash hash)
static String
getValidTimezone(String timezone)
Checks if given timezone string is supported by TimeZone and returns the same string if valid, null otherwiseCalendar
next()
Calendar
previous()
-
-
-
Constructor Detail
-
CronTabList
public CronTabList(Collection<CronTab> tabs)
-
-
Method Detail
-
check
public boolean check(Calendar cal)
Returns true if the given calendar matches
-
checkSanity
public String checkSanity()
Checks if this crontab entry looks reasonable, and if not, return an warning message.The point of this method is to catch syntactically correct but semantically suspicious combinations, like "* 0 * * *"
-
getValidTimezone
@CheckForNull public static String getValidTimezone(String timezone)
Checks if given timezone string is supported by TimeZone and returns the same string if valid, null otherwise- Since:
- 1.615
-
create
public static CronTabList create(@NonNull String format)
- Parameters:
format
- the crontab entry to be parsed- Throws:
IllegalArgumentException
- if the crontab entry cannot be parsed
-
create
public static CronTabList create(@NonNull String format, Hash hash)
- Parameters:
format
- the crontab entry to be parsed- Throws:
IllegalArgumentException
- if the crontab entry cannot be parsed
-
previous
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @CheckForNull public Calendar previous()
-
next
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @CheckForNull public Calendar next()
-
-