Try our conversational search powered by Generative AI!

OnStatusChanged does not update Scheduled Jobs UI



Our servers are running EPiServer v8.11. 

We have encountered a problem with jobs inherited from EPiServer.BaseLibrary.Scheduling.JobBase.

The admin UI will no longer show the update messages provided by the OnStatusChanged method. This makes it hard to see if a task is still running or started at all when starting them manually. I have searched all over, but have not seen any other report this problem.

Have anybody come across this problem before?


Trond Nilsen

Oct 27, 2015 13:15


The EPiServer.BaseLibrary.Scheduling.JobBase and EPiServer.Scheduler.ScheduledJobBase should be used as base class.

The OnStatusChanged method, should work using:

this.OnStatusChanged("Job step");
Oct 27, 2015 19:50

This is the code for my job;

        Description = "Index all members",
        DisplayName = "EPiServer Find Members indexing job",
        SortIndex = 9900)]
    public class MemberIndexer : EPiServer.BaseLibrary.Scheduling.JobBase

OnStatusChanges does not update the UI.

I'm not sure what you mean by EPiServer.BaseLibrary.Scheduling.JobBase and EPiServer.Scheduler.ScheduledJobBase...

Oct 28, 2015 12:47

I tested it on Alloy. And it looks like it's working. Try to add this test job to your code and check if it's working:

using System.Threading;
using EPiServer.PlugIn;

namespace ExtendingCompareVersion.Business
    [ScheduledPlugIn(DisplayName = "Test Job")]
    public class TestJob: EPiServer.Scheduler.ScheduledJobBase
        public override string Execute()
            for (var i = 0; i < 10; i++)
                this.OnStatusChanged("Job in progress: " + i);
            return "Job completed";
Oct 28, 2015 19:06

Looks like the ScheduledJobBase is a CMS 9 Class. I'm still on 8.11.

My code did work before, not sure if it happened in 8.11 or one of the minor releases before that.

Oct 29, 2015 13:15

Trond, Grzegorz,

I'm having this issue on Epi . I even tried Grzegorz's simple Test Job with Thread.Sleep example for sanity's sake, and it's still not publishing any statuses whatsoever for me. Have either of you run into this again since, or found any solutions?

P.S. I'd love to paste a screenshot, but can't for the life of me find how to attach a dang image in this wysiwyg.

Jun 15, 2017 5:03

Maxim, if you open "Network" tab in devtools - is page refresh happening to fetch new running status?

Jun 15, 2017 22:20

@Valdis -- yep, sure does. It tries to hit /EPiServer/CMS/Admin/DatabaseJob.aspx?GetRunningState=0838b94b-5e54-494f-9416-e611afe9e201 for the URL, and fails due to a null reference, it seems.

Going to attempt pasting the stack trace below.

Value cannot be null.
Parameter name: String

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: String

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentNullException: Value cannot be null.
Parameter name: String]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +14289492
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +177
   ScheduledParameterJob.DatabaseJobAdapter.get_Attribute() +48
   ScheduledParameterJob.DatabaseJobAdapter.OnInit(EventArgs e) +30
   System.Web.UI.Control.InitRecursive(Control namingContainer) +11938992
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +464
Jun 15, 2017 23:57

Do you need "ScheduledParameterJob" package?

Jun 16, 2017 1:01

Hmm, having a look -- but that shouldn't be required to provide basic status updates, should it? I thought that was default functionality for scheduled jobs.

Jun 16, 2017 18:24

No, that's separate package to be able to parametrize job runs (pass in parameters for jobs on every execute cycle). It's not standard Episerver stuff.

Jun 16, 2017 18:39

I see. Well, regardless, it looks like I already do have it :(
Package 'ScheduledParameterJob.1.1.0' already exists in project 'xxxx'

Any other ideas? :)

Jun 16, 2017 22:10

Question remains open - do you need that package? If not - try to uninstall and see if that solves the issue.

Jun 16, 2017 22:53

Gotcha -- I misunderstood, I thought you were saying I was missing it.

Genius. Removing that fixed all the things, it seems. Very interesting. The buttons for "Show Statistics" and "Scheduled job overview" even appeared, which were missing before. I guess that thing breaks a whole ton of stuff.

Thank you very much Valdis!

Jun 16, 2017 23:01

hahaaa sounds like you have installed another great plugin ;))

Jun 16, 2017 23:11

Hah -- I think you probably noticed that I had no idea what that was! So I definitely wasn't the one to install it, and will now know to avoid it like the plague :)

Jun 16, 2017 23:14

No I mean for "show statistics" and "overview" buttons.. I've seen those somewhere ;)

Jun 16, 2017 23:24

Ohhhh. God yeah, you're right, I think I saw those as a part of some plugin somewhere too. Hahaha, sheesh!

Jun 16, 2017 23:27
* 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.