Hi.
Our client has seen an issue with scheduled publishing of content not happening. This issue looks to be caused by the CMS admin site going to sleep through inactivity and not running the Content Publishing scheduled task for the site. I found the following article that highlights this issue - https://www.mcbeev.com/Blog/November-2019/Kentico-MVC-Quick-Tip-Fix-Scheduled-Content
I added the CMSUseAutomaticScheduler app setting with a value of "true" to the web.config file for the CMS site as recommended in the aticle, but I then noticed a number of scheduled tasks throwing exceptions. Here is the stack trace for the Content Publishing task as an example:
Message: Could not load file or assembly 'CMS.Reporting.Web.UI' or one of its dependencies. The system cannot find the file specified.
Exception type: System.IO.FileNotFoundException
Stack trace:
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at CMS.Base.ClassHelper.GetAssemblyInternal(String assemblyName)
at CMS.Base.ClassHelper.GetClassInternal(String assemblyName, String className)
at CMS.Scheduler.SchedulingExecutor.GetTaskExecutionDelegate(TaskInfo taskInfo)
at CMS.Scheduler.SchedulingExecutor.ExecuteTaskInternal(TaskInfo taskInfo)
Removing the app setting has resolved this and the tasks are now running correctly. Can anyone explain what the problem here is and what I can do to fix it so that I can use the app setting to resolve my original issue?
Many thanks.