Bug reports
Version 2.x > Bug reports > Scheduled Tasks View modes: 
User avatar
Member
Member
Nicola - 8/1/2010 9:04:08 PM
   
Scheduled Tasks
We are using v2.3a and have recently run into issues with our scheduled tasks. These no longer seem to run and the following error is being logged:
Source: Scheduler Timer
Event code: TIMERERROR
Description: Message: Thread was being aborted., Stack Trace: at System.Threading.Thread.SleepInternal (Int32 milliseconds Timeout) at CMS.Scheduler.SchedulingTimer.Run())

Any ideas as to what may be causing this?

Thanks.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 8/2/2010 4:11:51 AM
   
RE:Scheduled Tasks
Hello,

This error might be caused by a bug, which wasn't fixed until the 4.1 version of Kentico. Could you please try the following approaches?

A) Could you please check the files in ~\App_Data\CMSModules\WebAnalytics if there are all in the right format, if you are using the webanalitics module?

B) Could you please try to follow procedure bellow:

1. Open App_Code folder
2. Make backup of Global.asax.cs file
3. Open Global.asax.cs file in VS or any text editor
4. Navigate to line approximately 667
5. Change this code:
  // Get passive timer and execute
SchedulingTimer timer = SchedulingTimer.EnsureTimer(siteName, false);
timer.ExecuteAsync();

to this code
   try
{
// Flush the output
HttpContext.Current.Response.Flush();

// Run scheduler actively within the request
string serverName = SettingsHelper.AppSettings["CMSWebFarmServerName"];
SchedulingExecutor.ExecuteScheduledTasks(siteName, serverName);
}
catch
{
}

C) Could you please also try to display ~\CMSPages\scheduler.aspx page with and without 'www' prefix in your domain name and let me know what you see on this page?

Best regards,
Boris Pocatko

User avatar
Member
Member
Nicola - 8/2/2010 3:31:54 PM
   
RE:Scheduled Tasks
Hi,

a) We are not using the webanalitics module.

b) I could not find that code in the App_Code\Global.asax.cs file, the only similar code I could find was:
// If scheduler run request acquired, run the actions
if (SchedulingTimer.RequestRun(currentSite.SiteName))
{
SchedulingExecutor.ExecuteScheduledTasks(currentSite.SiteName, ConfigurationManager.AppSettings["CMSWebFarmServerName"]);
}

c) The page displayed - "This page is used for execution of scheduled tasks."

Thanks,
Nicola.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 8/5/2010 2:35:21 AM
   
RE:Scheduled Tasks
Hello,

Could you please post the windows log regarding this issue?
Is the task, which generates this error, one of your owns (a custom one) or one, which is available in Kentico by default?

Best regards,
Boris Pocatko