API Overview API Index Package Overview Direct link to this page
JavaOnTracks 0.1.2
  net.jot.scheduler. JOTSchedulingOptions View Source
Author(s)
Since
Version
Serial
Hierarchy
 Object
      JOTSchedulingOptions
Implements
Subclasses
Description
public class JOTSchedulingOptions
  This reprsents a scheduled job "schedule".
See also:   
Constructors
public JOTSchedulingOptions ()
Methods
Hide/Show inherited methods
public Vector getRunAtDays ()
public Vector getRunAtHours ()
public Vector getRunAtMinutes ()
public Vector getRunAtMonth ()
public Vector getRunAtWeekDays ()
public long getRunEvery ()
publicstatic String getScheduleHelp ()
public int getThreadingScheme ()
pack-private boolean isScheduleEnabled ()
  Wether a schedule item was added (ie: setRunAt() was called)
public boolean isStartNow ()
publicstatic boolean isValid (String schedule)
public void setRunAt (String cronEntry)
  Request a run "right now" Very much like an unix cron line But the order is different:
Month(o=january) Day(1=1st) DayOfWeek(0=sunday) Hour Minute
'* * * 5,14 0' any day at 5:00 AM and 2:00 PM
'* * * 5,14 8' any day at 5:08 AM and 2:08 PM
'* * 0 0 0' any sunday at 00:00 AM
'* 1 * 0 0' any 1st of the month at 00:00 AM
'* 13 5 0 0' any Friday the 13th at 00:00AM
'* * * * *' any minute of any day.
'0 * * * *' any minute of any day in January
'2 13 5 0 0' Friday the 13th in March at 00:00 AM";
public void setRunEvery (long minutes, boolean startingNow)
  run the job at an interval (in milliseconds) ie: runEvery(EVERY_5_MINUTE); minutes: interval in minutes.
public void setRunNow (boolean runNow)
  Request a run right away
public void setThreadingScheme (int scheme)
  Set the threading scheme: ie: - DROP_NEW_CALLS_IF_PREVIOUS_NOT_COMPLETED - START_NEW_THREAD_IF_PREVIOUS_NOT_COMPLETED
Fields
Hide/Show inherited fields
publicfinalstatic int DROP_NEW_CALLS_IF_PREVIOUS_NOT_COMPLETED = "1"
Only allow one call to run at a time If one is already running will just skip the new call
publicfinal long EVERY_12_HOURS = "720"
publicfinal long EVERY_15_MINUTES = "15"
publicfinal long EVERY_24_HOUR = "1440"
publicfinal long EVERY_3_HOURS = "180"
publicfinal long EVERY_30_MINUTES = "30"
publicfinal long EVERY_5_MINUTES = "5"
publicfinal long EVERY_6_HOURS = "360"
publicfinal long EVERY_HOUR = "60"
publicfinal long EVERY_MINUTE = "1"
publicfinalstatic String scheduleHelp = "Schedule format:
Month(s) Day(s) WeekDay(s) Hour(s) Minute(s) : Space separated.
Month: 0=january, 11=December
Days of week: 0=Sunday, 6=Saturday
Day of month: 1 = 1st of the month.
Hours: 0=Midnight, 23=11PM
Examples:
'* * * 5,14 0' any day at 5:00 AM and 2:00 PM
'* * * 5,14 8' any day at 5:08 AM and 2:08 PM
'* * 0 0 0' any sunday at 00:00 AM
'* 1 * 0 0' any 1st of the month at 00:00 AM
'* 13 5 0 0' any Friday the 13th at 00:00AM
'* * * * *' any minute of any day.
'0 * * * *' any minute of any day in January
'2 13 5 0 0' any Friday the 13th in March at 00:00 AM"
publicstatic int START_NEW_THREAD_IF_PREVIOUS_NOT_COMPLETED
Allow multiple concurrent calls
publicfinalstatic Pattern validator
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.5     ©Thibaut Colar