Tobias Nilsson
Dec 20, 2010
  8434
(2 votes)

Troubleshooting the Scheduler

 We have seen a influx of cases regarding the Scheduler service, so I thought it would be a good time to write about how to troubleshoot it yourself!

The deal

The scheduling service run jobs you define for it and also EPiServer's own shipped jobs, such as archiving pages, subscription and delete wastebasket pages.

But sometimes it goes wrong and the scheduler doesn't automatically run the jobs anymore. It's stuck.

The tactics

We have a few tactics we use. First one is to delete the, possibly corrupted,  config file and there's a FAQ item describing how to do that. If that doesn't work we usually suggest to the client to delete all the rows in the two tables the scheduler uses, tblScheduledItem and tblScheduledItemLog. To be able to do that you must first deactivate the foreign key defined on tblScheduledItemLog to tblScheduledItem. This can be achieved using the first line below.

ALTER TABLE tblScheduledItemLog NOCHECK CONSTRAINT ALL
ALTER TABLE tblScheduledItemLog CHECK CONSTRAINT ALL

Don't worry about truncating these two tables as they are recreated by the Scheduler service. But as always when making changes directly in the database you should take a backup. Safety first, don't forget that!

The third way is to figure it out yourself by logging the Scheduler service. The scheduler service can use the log4net logging framework (as all of our services), so you only need to drop a log4net.dll and a log4net.config (see the fileAppender section) in its folder for it to start logging. This way you can see what's causing the scheduler to fail and hopefully you can fix it yourself.

Example of a log4net.config file 

<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<appender name="ErrorAppender" type="log4net.Appender.FileAppender" >
<file value="C:\temp\LogServerError.log" />
<appendToFile value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%d [%t] %l - %m%n" />
</layout>
</appender>

<root>
<level value="ALL" />
<appender-ref ref="ErrorAppender" />
</root>
</log4net>

Dec 20, 2010

Comments

Please login to comment.
Latest blogs
Opti ID overview

Opti ID allows you to log in once and switch between Optimizely products using Okta, Entra ID, or a local account. You can also manage all your use...

K Khan | Jul 26, 2024

Getting Started with Optimizely SaaS using Next.js Starter App - Extend a component - Part 3

This is the final part of our Optimizely SaaS CMS proof-of-concept (POC) blog series. In this post, we'll dive into extending a component within th...

Raghavendra Murthy | Jul 23, 2024 | Syndicated blog

Optimizely Graph – Faceting with Geta Categories

Overview As Optimizely Graph (and Content Cloud SaaS) makes its global debut, it is known that there are going to be some bugs and quirks. One of t...

Eric Markson | Jul 22, 2024 | Syndicated blog

Integration Bynder (DAM) with Optimizely

Bynder is a comprehensive digital asset management (DAM) platform that enables businesses to efficiently manage, store, organize, and share their...

Sanjay Kumar | Jul 22, 2024

Frontend Hosting for SaaS CMS Solutions

Introduction Now that CMS SaaS Core has gone into general availability, it is a good time to start discussing where to host the head. SaaS Core is...

Minesh Shah (Netcel) | Jul 20, 2024

Optimizely London Dev Meetup 11th July 2024

On 11th July 2024 in London Niteco and Netcel along with Optimizely ran the London Developer meetup. There was an great agenda of talks that we put...

Scott Reed | Jul 19, 2024