res.setRecurringDay(formatRecurringDayOfMonth(taskSchedule.getDaysToRun()));
}
else if (CronSchedule.class.isAssignableFrom(task.getSchedule().getClass())) {
resource = new ScheduledServiceAdvancedResource();
CronSchedule taskSchedule = (CronSchedule) task.getSchedule();
ScheduledServiceAdvancedResource res = (ScheduledServiceAdvancedResource) resource;
res.setCronCommand(taskSchedule.getCronString());
}
if (resource != null) {
resource.setId(task.getId());
resource.setEnabled(task.isEnabled());