DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Scheduler suddenly stops working

You are not authorized to post a reply.

New Around Here

    We're using DNN 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?


    Veteran Member

      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. 

      New Around Here

        Thank you for your reply Will! We're going over your suggestions and will post here our findings.


        New Around Here

          Thank you for your reply Will! We're going over your suggestions and will post here our findings.


          Advanced Member

            In any scheduled task details, check the "Server" field is empty. That field can be used to run that task only on a specific server and if that server no longer exists, it might be your issue.

            Growing Member

              In Persona Bar -> Settings -> Servers -> System Info -> WEB SERVERS, check that all of the servers listed there exist and are contactable. Remove anything that is out of date.
              You are not authorized to post a reply.

              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:

              1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
              2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
              3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
              4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
              5. No Flaming or Trolling.
              6. No Profanity, Racism, or Prejudice.
              7. Site Moderators have the final word on approving / removing a thread or post or comment.
              8. English language posting only, please.

              Would you like to help us?

              Awesome! Simply post in the forums using the link below and we'll get you started.

              Get Involved