We're using DNN PLATFORM v. 09.12.00 (0) and since we upgraded to this version, we've noticed that the scheduler suddenly stops working and no scheduled tasks get executed and when trying to manualle run the scheduled task, nothing happens (no visual error is displayed), no task gets executed. Reviewing the logs we can see the following error after attempting to manually run a scheduled task: 2024-02-27 23:57:57,210 [servername][Thread:Scheduler Thread][ERROR] DotNetNuke.Services.Exceptions.Exceptions - System.InvalidOperationException: Sequence contains no elements at System.Linq.Enumerable.First[TSource](IEnumerable`1 source) at DotNetNuke.Services.Scheduling.Scheduler.CoreScheduler.ValidateServersAreActiveForScheduledItem(ScheduleItem scheduleItem) at DotNetNuke.Services.Scheduling.Scheduler.CoreScheduler.AddToScheduleQueue(ScheduleHistoryItem scheduleHistoryItem) at DotNetNuke.Services.Scheduling.Scheduler.CoreScheduler.LoadQueueFromTimer() at DotNetNuke.Services.Scheduling.Scheduler.CoreScheduler.Start()
This is a strange error, as all Scheduled Tasks had been running fine until an unlown point when suddenly it stops working. Looking into the ValidateServersAreActiveForScheduledItem method, the code shouldn't even be reaching that point as there is no server name attached to the Scheduled Task, it is blank, so the ValidateServersAreActiveForScheduledItem should return true all the time.
This issue gets resolved by restarting the app and then everything starts working again. Wondering if anyone out there has seen this issue or something similar?
Gus
First, hopefully, you're not experiencing issues due to changes to the core of DNN. I'd recommend using the Security Analyzer in the persona bar to see if there are any detectable issues.
Next, it's worth noting that the Scheduler is not running constantly, by default. Sometimes when you go in, if there aren't any actively running tasks, it will appear to not be running. What's your setting for the scheduler right now?
Also, it's not completely unusual to have intermittent or even regularly occurring errors resulting from the scheduler. Most often, this is either due to orphaned scheduled tasks that should be removed/disabled; and from the servers table having invalid server names.
Be sure to look at the Servers view in the persona bar and use the "Remove Inactive Servers" feature, if it's there.
Next, review all of the scheduled tasks to see if any are actually no longer necessary.
Thank you for your reply Will! We're going over your suggestions and will post here our findings.
These Forums are dedicated to the discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.