Testing and fixing scheduler
This commit is contained in:
parent
20f4b371d1
commit
b2d9fb43b2
7 changed files with 44 additions and 51 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue