Testing and fixing scheduler

This commit is contained in:
vfedosevich 2013-05-24 17:47:39 +03:00
parent 20f4b371d1
commit b2d9fb43b2
7 changed files with 44 additions and 51 deletions

View file

@ -152,10 +152,10 @@ namespace WebsitePanel.EnterpriseServer
{
// check account
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo);
if (accountCheck < 0)
return accountCheck;
SchedulerJob schedule = GetScheduleComplete(scheduleId);
if (schedule == null)
return 0;
@ -177,9 +177,9 @@ namespace WebsitePanel.EnterpriseServer
schedule.ScheduleInfo.MaxExecutionTime, parameters) { Status = BackgroundTaskStatus.Starting };
TaskController.AddTask(backgroundTask);
return 0;
}
}
public static int StopSchedule(int scheduleId)
{

View file

@ -109,7 +109,7 @@ namespace WebsitePanel.EnterpriseServer
objTask.DoWork();
else
throw new Exception(String.Format("Could not create scheduled task of '{0}' type",
task.TaskType));
task.TaskType));
}
catch (Exception ex)
{