/** * Indicates whether the specified cron expression can be parsed into a * valid cron expression * * @param cronExpression the expression to evaluate * @return a boolean indicating whether the given expression is a valid cron * expression */ public static boolean isValidExpression(String cronExpression) { try { new CronExpression(cronExpression); } catch (ParseException pe) { return false; } return true; }
/** * Indicates whether the specified cron expression can be parsed into a * valid cron expression * * @param cronExpression the expression to evaluate * @return a boolean indicating whether the given expression is a valid cron * expression */ public static boolean isValidExpression(String cronExpression) { try { new CronExpression(cronExpression); } catch (ParseException pe) { return false; } return true; }
public static Date getNextTriggerTime(String cronExpression) { try { CronExpression cron = new CronExpression(cronExpression); return cron.getTimeAfter(new Date()); } catch (ParseException e) { throw new CronException(e); } }
public static Date getNextTriggerTime(String cronExpression, Date timeAfter) { try { CronExpression cron = new CronExpression(cronExpression); if (timeAfter == null) { timeAfter = new Date(); } return cron.getTimeAfter(timeAfter); } catch (ParseException e) { throw new CronException(e); } }
public static Date getNextTriggerTime(String cronExpression, Date timeAfter) { try { CronExpression cron = new CronExpression(cronExpression); if (timeAfter == null) { timeAfter = new Date(); } return cron.getTimeAfter(timeAfter); } catch (ParseException e) { throw new CronException(e); } }
public static Date getNextTriggerTime(String cronExpression) { try { CronExpression cron = new CronExpression(cronExpression); return cron.getTimeAfter(new Date()); } catch (ParseException e) { throw new CronException(e); } }
/** * Indicates whether the specified cron expression can be parsed into a * valid cron expression * * @param cronExpression the expression to evaluate * @return a boolean indicating whether the given expression is a valid cron * expression */ public static boolean isValidExpression(String cronExpression) { try { new CronExpression(cronExpression); } catch (ParseException pe) { return false; } return true; }
public static Date getNextTriggerTime(String cronExpression, Date timeAfter) { try { CronExpression cron = new CronExpression(cronExpression); if (timeAfter == null) { timeAfter = new Date(); } return cron.getTimeAfter(timeAfter); } catch (ParseException e) { throw new CronException(e); } }
public static Date getNextTriggerTime(String cronExpression) { try { CronExpression cron = new CronExpression(cronExpression); return cron.getTimeAfter(new Date()); } catch (ParseException e) { throw new CronException(e); } }