Try our conversational search powered by Generative AI!

How to tell if the current instance is the scheduler app


I've a requirement to run some code on the scheduler app instance in DXC alongside our scheduled job, which creates and schedules jobs according to Azure Service Bus messages.

At the moment i'm trying to read the local machines 'hostname' and provide something in config that matches that hostname to let us know we are on the correct machine or not for starting our extra code. Problem i have is the hostname appears to be changing on each deploy, or at least isn't completely static

Is there a simple way to tell if scheduled jobs are enable in the current instance of EpiServer?

Oct 30, 2020 9:51

Easiest way could be to look for the enableScheduler in the Episerver config? 

Oct 30, 2020 12:01

Thanks @David, i thought of that approach, but couldn't find a clear way to access those settings, as it's not <appSettings> but <applicationSettings> instead.

Oct 30, 2020 12:03

Haven't tried myself, but Settings.Instance.EnableScheduler might work.

Or you can get the Settings instance by dependency injection, same thing. 

Oct 30, 2020 12:15
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.