ClassBody classBody = getClassBody(task); byte[] state = encode(task); final Date startDate = cronSchedule.getExpression().getNextValidTimeAfter(new Date()); if (startDate == null) { throw new IllegalArgumentException("Wrong cron expression! Unable to calculate start date"); params.setState(state); params.setStartTime(startTime); params.setCronExpression(cronSchedule.getExpression().getCronExpression()); params.setTimezone(cronSchedule.getExpression().getTimeZone().getID()); params.setExecutorId(executorId); RemotePromise<Void> result = (RemotePromise<Void>) asyncScheduledServiceAtFixed.schedule(params);
ClassBody classBody = getClassBody(task); byte[] state = encode(task); final Date startDate = cronSchedule.getExpression().getNextValidTimeAfter(new Date()); if (startDate == null) { throw new IllegalArgumentException("Wrong cron expression! Unable to calculate start date"); params.setState(state); params.setStartTime(startTime); params.setCronExpression(cronSchedule.getExpression().getCronExpression()); params.setTimezone(cronSchedule.getExpression().getTimeZone().getID()); params.setExecutorId(executorId); RemotePromise<Void> result = (RemotePromise<Void>) asyncScheduledServiceAtFixed.schedule(params);
ClassBody classBody = getClassBody(task); byte[] state = encode(task); final Date startDate = cronSchedule.getExpression().getNextValidTimeAfter(new Date()); if (startDate == null) { throw new IllegalArgumentException("Wrong cron expression! Unable to calculate start date"); params.setState(state); params.setStartTime(startTime); params.setCronExpression(cronSchedule.getExpression().getCronExpression()); params.setTimezone(cronSchedule.getExpression().getTimeZone().getID()); params.setExecutorId(executorId); RemotePromise<Void> result = (RemotePromise<Void>) asyncScheduledServiceAtFixed.schedule(params);