/** * <p> * Sets the time zone for which the <code>cronExpression</code> of this <code>CronTrigger</code> will be resolved. * </p> * <p> * If {@link #setCronExpression(CronExpression)} is called after this method, the TimeZone setting on the CronExpression will "win". However if * {@link #setCronExpression(String)} is called after this method, the time zone applied by this method will remain in effect, since the String cron * expression does not carry a time zone! */ public void setTimeZone(TimeZone timeZone) { if (cronEx != null) { cronEx.setTimeZone(timeZone); } this.timeZone = timeZone; }
/** * <p> * Sets the time zone for which the <code>cronExpression</code> of this <code>CronTrigger</code> will be resolved. * </p> * <p> * If {@link #setCronExpression(CronExpression)} is called after this method, the TimeZone setting on the CronExpression will "win". However if * {@link #setCronExpression(String)} is called after this method, the time zone applied by this method will remain in effect, since the String cron * expression does not carry a time zone! */ public void setTimeZone(TimeZone timeZone) { if (cronEx != null) { cronEx.setTimeZone(timeZone); } this.timeZone = timeZone; }
/** * Sets the time zone for which the <code>cronExpression</code> of this <code>CronTrigger</code> * will be resolved. * * <p>If {@link #setCronExpression(CronExpression)} is called after this method, the TimeZone * setting on the CronExpression will "win". However if {@link #setCronExpression(String)} is * called after this method, the time zone applied by this method will remain in effect, since the * String cron expression does not carry a time zone! */ public void setTimeZone(TimeZone timeZone) { if (cronEx != null) { cronEx.setTimeZone(timeZone); } this.timeZone = timeZone; }
public void setCronExpression(String cronExpression) throws ParseException { TimeZone origTz = getTimeZone(); this.cronEx = new CronExpression(cronExpression); this.cronEx.setTimeZone(origTz); }
public void setCronExpression(String cronExpression) throws ParseException { TimeZone origTz = getTimeZone(); this.cronEx = new CronExpression(cronExpression); this.cronEx.setTimeZone(origTz); }
public void setCronExpression(String cronExpression) throws ParseException { TimeZone origTz = getTimeZone(); this.cronEx = new CronExpression(cronExpression); this.cronEx.setTimeZone(origTz); }
/** * Constructs a new {@code CronExpression} as a copy of an existing instance. * * @param expression The existing cron expression to be copied */ public CronExpression(CronExpression expression) { /* * We don't call the other constructor here since we need to swallow the ParseException. We also avoid some of the sanity checking as it is not * logically trippable. */ this.cronExpression = expression.getCronExpression(); try { buildExpression(cronExpression); } catch (ParseException ex) { throw new AssertionError(); } if (expression.getTimeZone() != null) { setTimeZone((TimeZone) expression.getTimeZone().clone()); } }
/** * Constructs a new {@code CronExpression} as a copy of an existing instance. * * @param expression The existing cron expression to be copied */ public CronExpression(CronExpression expression) { /* * We don't call the other constructor here since we need to swallow the ParseException. We also avoid some of the sanity checking as it is not * logically trippable. */ this.cronExpression = expression.getCronExpression(); try { buildExpression(cronExpression); } catch (ParseException ex) { throw new AssertionError(); } if (expression.getTimeZone() != null) { setTimeZone((TimeZone) expression.getTimeZone().clone()); } }
/** * Constructs a new {@code CronExpression} as a copy of an existing instance. * * @param expression The existing cron expression to be copied */ public CronExpression(CronExpression expression) { /* * We don't call the other constructor here since we need to swallow the ParseException. We also avoid some of the sanity checking as it is not * logically trippable. */ this.cronExpression = expression.getCronExpression(); try { buildExpression(cronExpression); } catch (ParseException ex) { throw new AssertionError(); } if (expression.getTimeZone() != null) { setTimeZone((TimeZone) expression.getTimeZone().clone()); } }