It's been reported elsewhere (http://world.episerver.com/FAQ/Items/Scheduler-does-not-run-scheduled-jobs-automatically/) 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  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  EPiServer.Global.Global_Error - 1.2.5 Unhandled exception in ASP.NETSystem.Web.HttpException: Server cannot append header after HTTP headers have been sent. at System.Web.HttpResponse.AppendHeader(String name, String value)
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.
Should anyone else encounter a similar problem where the documented steps (http://world.episerver.com/FAQ/Items/Scheduler-does-not-run-scheduled-jobs-automatically/) 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 (http://www.epinova.no/blog/Tore-Gjerdrum/dates/2010/11/enable-debugging-in-episerver-scheduler/) 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.
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'
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.
Did this also resolve the errors you got regarding EPiServer.Core.OptimisticCache ?
Finally I thought I got the solution, I tried this http://world.episerver.com/Blogs/Tobias-Nilsson/Dates/2010/12/Troubleshooting-the-Scheduler/ but after 5 days it stopped again...
I think this is the same problem I had. You should contact EPiServer support, see this thread: http://world.episerver.com/Modules/Forum/Pages/thread.aspx?id=52210
@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.
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.
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. :)
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.
@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.
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" /> </logger>