// schedule service
try {
if (null!=request.getParameter("_RUN_SYNC_") && request.getParameter("_RUN_SYNC_").equals("Y")) {
syncServiceResult = dispatcher.runSync(serviceName, serviceContext);
} else {
dispatcher.schedule(jobName, poolName, serviceName, serviceContext, startTime, frequency, interval, count, endTime, maxRetry);
}
} catch (GenericServiceException e) {
String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.service_dispatcher_exception", locale);
request.setAttribute("_ERROR_MESSAGE_", "<li>" + errMsg + e.getMessage());
return "error";