Try our conversational search powered by Generative AI!

Scheduler tasks not running automatically: EPiServer CMS6


EPiServer CMS6

It's been reported elsewhere ( that scheduler does not run automatically, but will run okay when started manually.

I am experiencing this problem and have worked through the remedy suggested in the above link - but no joy.

After restarting IIS the new EPiServer.SchedulerService.Sites.xml file is created (although it was identical to the renamed one), and still the scheduler will not run automatically.

When the scheduler is kicked off manually to run our subscription job, the logs get a couple of errors that may be related to this problem: regardless, advice on how to address these errors would be appreciated.  Please let me know if they should be separated out to new topics to help others when searching the forum:


2011-05-10 16:13:02,976 ERROR [1] EPiServer.Core.OptimisticCache`1.Read - cacheKey=EPPageData:5909, last exception was:
EPiServer.Core.PageNotFoundException: Page 5909 was not found
at EPiServer.DataAccess.PageLoadDB.LoadPageInternal(PageReference pageLink, Int32 languageBranchId, IDataReader reader)
   ... [snip] ...
   at EPiServer.Core.OptimisticCache`1.Read(String cacheKey, ReadAndCacheObject`1 readAndCacheObject)


2011-05-10 16:13:26,398 ERROR [6] EPiServer.Global.Global_Error - 1.2.5 Unhandled exception in ASP.NET
System.Web.HttpException: Server cannot append header after HTTP headers have been sent.
at System.Web.HttpResponse.AppendHeader(String name, String value)
   ... [snip] ...
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


For ONE - I would like to know how to remove the deleted page reference from the cache

For both ONE and TWO - could they be related to the scheduler not working automatically, or where else can I investigate.


May 10, 2011 6:33


Should anyone else encounter a similar problem where the documented steps ( don't help, this is what occured.

In mid-April we changed the domain our site was running on - making all the appropriate changes under our site config files (and in the EPiServer admin system area).  The scheduler stopped working from this date and it was always anticipated that this was a potential cause for the problem ... but still not definite.

After enabling scheduler service logging ( the logs showed that [at least] one task was scheduled next to run in mid-April ... a past date.  Checking through all next run dates and setting them to a future time resolved the problem.

May 16, 2011 2:17

Had the same problem but I also needed to edit an old NextExec item directly in the database with:

select * from tblScheduledItem where pkID ='b740749e-61aa-48ce-b38a-5119ce6b453a'

update tblScheduledItem set NextExec = '2011-08-10 11:53:03.430' where pkID = 'b740749e-61aa-48ce-b38a-5119ce6b453a'


Aug 10, 2011 10:22

One additional thing on this:  the problem recurred, and was able to be fixed in the same way each time.  Further investigation proved to be that one of the scheduled tasks was not completing (have not remedied that one yet - but want to: te execellent tool LinkDetective is running awry for us).  Stopping the errant scheduled task has resolved the problem completely in the interim.

Aug 11, 2011 22:44

Did this also resolve the errors you got regarding EPiServer.Core.OptimisticCache ?

Aug 23, 2011 14:23

Finally I thought I got the solution, I tried this but after 5 days it stopped again...

Aug 23, 2011 14:50

I think this is the same problem I had. You should contact EPiServer support, see this thread:

Aug 23, 2011 16:00

@Kjetil - sorry for delayed replied: No, the OptimisticCache errors still occur.  I have seen an article for supressing these from logs.  I can try and hunt that out if it's of interest.

@Torbjorn - We've had another site behave such as yours but htis time unable to find a errant scheduled task associated with it.  It came right (magically - which is always disappointing).  I will have a read of Kalle's linked thread. 

Dec 14, 2011 5:21

The optimistic cache error is when the we can't find the page in the cache so we try to get it from the database, but we can't find it there either. So there must be some link in the code that points to a deleted page. 

Dec 14, 2011 8:44

Do you mean that the link is referenced in the code somewhere, and not as a part of the content?

Any suggestions as to how we can trace these links' origin?

@piquet: I have also seen an article about supressing this form the logs, but rather than treating the symptoms, I would like to treat the cause. :)


Edited, Dec 14, 2011 9:01

Part of the content or part of the code. You can have hardcoded links in your code. If you enable the log on debug level you should be able to follow what happened before the error.

Dec 14, 2011 9:04

@Kjetil:  Agreed - wouldn't it be nice to have empty error logs!  :-)  In this case, and agreeing with Toni, I feel this is much less of an ERROR and would better sent to logs as a WARN.   Anyway, I'm straying from topic.

Dec 14, 2011 20:42

Just to close off reducing the OptimisticCache logging:  The line in EPiServerLog.config is:

<!-- Reduce amount of logging from OptimisticCache -->
<logger name="EPiServer.Core.OptimisticCache" additivity="false">
<level value="Error" />

Dec 14, 2011 20:46
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.