11 Replies Latest reply on Oct 27, 2010 7:53 AM by nefastkurt

    Recurring Scheduled Tasks Become Unscheduled




      I have a strange situation happening here and am looking for some suggestions.   I have a scheduled task which is supposed to execute a custom script against devices determined by a targeted query.  The custom script does nothing other than copy a file, the task is set to perform a Wake on LAN in the task properties.  The goal of the task is simply to wake machines.


      If I set the task to run once, it seems to run fine.  However, if I set the task to recur weekly against ALL, the task will becomes unscheduled at some point and never execute, or perhaps execute once before it becomes unscheduled.


      I found a similar post in these forums but the only real suggestion was that someone must be altering the task.   That is definitely not the case here.  The targeted query is Public and the task is under "My Tasks" if that makes any difference.


      We are running 8.8.


      Any ideas?  Thanks in advance.



        • 1. Re: Recurring Scheduled Tasks Become Unscheduled
          phoffmann SupportEmployee

          What version of 8.8 are you running - SP2A has been released and can be gotten here:



          Never heard of / seen something like this personally ... rather curious. How reproducable is this behaviour?


          Is this something you can duplicate on a test-core of/in your environment?


          The reason I ask is because if this is somewhat reproducable this should be then repeatable by us (we'd obviously need a support ticket and detailed instructions on what you do) ...


          ... there's a possibility that something in .NET and/or IIS breaks ... but in that case I'd expect the entirety of the scheduler to go down along with it, and at least from your description it seems that there is no such thing ... the repeated task simply stops being repeated ...


          Hmm - is there anything of interest in the scheduler service logs? (SCHEDSVC-logs) ? You'll need to know the TASKID of you particular task (if you scroll to the right-most-side in the scheduled tasks (either "My Tasks" or "Public tasks", depending where it is), you'll see the column "TASK ID" - this is the primary (numeric) identifier that will be referenced in the logs ...


          Paul Hoffmann

          LANDesk EMEA Technical Lead

          • 2. Re: Recurring Scheduled Tasks Become Unscheduled

            Thanks for the quick reply.  We are on the base 8.8 installation at present.  SP2a is in queue to be deployed but we aren't able to get to it right away.  After your comment about IIS, I checked the server and we are getting  the following error :

            Type:      Error

            Source:   Application Error

            Event ID:               1000

            Event Time:         1/16/2009 10:04:54 PM

            User:      n/a

            Computer:             LANDeskas


            Faulting application w3wp.exe, version 6.0.3790.3959, faulting module oobcredwrap.dll, version, fault address 0x00001a79.



            Logs show pretty much nothing after it becomes "unscheduled'.  The task just isn't there at the scheduled times.  When it does run, we see this in schedsvc.log:

            Tue, 13 Jan 2009 22:00:09 Task 303, has query targets evaluating them
            Tue, 13 Jan 2009 22:00:13 Task 303, has requested that machines be woken
            Tue, 13 Jan 2009 22:12:41 External wakeup application returned 0
            Tue, 13 Jan 2009 22:12:44 Troubleshooting information: A global scheduler task (GlobalTask_Idn 275) was detected, Launching the global scheduler skeleton to process the task.
            Tue, 13 Jan 2009 22:35:15 Troubleshooting information: The skeleton has completed processing global scheduler task (GlobalTask_Idn 275).
            Tue, 13 Jan 2009 22:35:15 Global task (275) has completed.
            Tue, 13 Jan 2009 22:35:22 Task 303, exitcode 6 has been translated to status 6
            Tue, 13 Jan 2009 22:35:22 Setting task 303 status to 6
            Tue, 13 Jan 2009 22:35:22 Sending task 303 status of 6 to mbsdk
            Tue, 13 Jan 2009 22:35:22 Sending alert locally E:\Program Files\LANDesk\ManagementSuite\MBSDKAlertHandler.exe taskid=303

            and this in LANDesk.Scheduler.GlobalScheduler.exe.log:


            1/13/2009 10:12:41 PM : Core name obtained from database : LANDesk
            1/13/2009 10:12:42 PM :          303 : Task targets have completed loading.
            1/13/2009 10:12:42 PM :          303 : Calling global scheduler client(s) to process machines.
            1/13/2009 10:12:42 PM :          303 : Updating allowed machines if needed.
            1/13/2009 10:12:42 PM :          303 : Calling method to perform remote operations.
            1/13/2009 10:12:42 PM :          303 : Before hasherize of E:\Program Files\LANDesk\ManagementSuite\landesk\files\LANDesk-task-303.pmf
            1/13/2009 10:12:42 PM :          303 : After hasherize
            1/13/2009 10:12:42 PM : Core name obtained from database : LANDesk
            1/13/2009 10:12:42 PM :          303 : Troubleshooting guidelines
            The global scheduler has delegated task 303.
              The task was delegated by (source): LANDesk
              This task was delegated to (dest) : LANDesk
              Using GlobalTask_Idn              : 275
            This delegation was done by creating an entry in the GlobalTask table on the destination core (the task id is provided above).
            The Entry in the GlobalTask should have set to state column to 1 to indicate that it is a new task and should be processed.
            The scheduler service should detect and process this delegated task, please check scheduler service log on the destination core to see if it successfully detected the GlobalTask entry.

            I have replicated the problem with different tasks and custom scripts but have not yet done so on our test server...was hoping it was just something I was obviously missing.  I will give this a shot today.

            • 3. Re: Recurring Scheduled Tasks Become Unscheduled
              phoffmann SupportEmployee

              Nothing particularly "obvious" that you've missed (unfortunately)  - this shouldn't be happening. But you being on 8.8 vanilla is a bit of a bother.


              The IIS error is a bit peculiar ... if IIS itself is dying though, it'll take down quite a bit of LANDesk with itself (Scheduler is just one of the components that uses it) - so that's not good.


              Can you install SP2a on your test Core and see if you still have the behaviour (I'm assuming you have snapshots of it / can roll it back if needed?) -- various improvements to the scheduler came in during the period of time, and it's certainly a good starting point ... .


              Paul Hoffmann

              LANDesk EMEA Technical Lead

              • 4. Re: Recurring Scheduled Tasks Become Unscheduled

                Hmm, ok.  Can't reproduce the problem (at least not immediately) on the Dev Core server.  Created both a weekly and a daily task and both are still correctly scheduled after running the first time.


                SP2a will be a long time coming relative to the need here, so I'll have to see about finding a workaround meanwhile.

                • 5. Re: Recurring Scheduled Tasks Become Unscheduled
                  phoffmann SupportEmployee

                  What are the reasons for the "long wait" for the SP2 (or an SP X, by the time you'll get to it?), maybe it's something that we can address / help out with.


                  Is the Dev-Core in your production environment (i.e. - affected by the same GPO's & co?) If so, then I don't think this is an environmental problem, but more likely that "something" is Broken on the Core (which is going to be interesting to find)...


                  If the Dev-Core is separate from your production Core, it's possible that someone's fiddled with GPO's somewhere and this caused this problem to manifest (wouldn't be the first time), or something like that. Also, does the Dev-Core use a backup of your DB atll? (If it does, I'm assuming you're changing the needed data in the DB ... if you're not sure what to change, let me know). If it's using its own DB, it could (potentially) be a DB-side problem ... though DB-side problems are more nuclear normally (i.e. "it works / doesn't work") ... not "it works some time then breaks"...


                  Hope this helps along a little bit at least.


                  Paul Hoffmann

                  LANDesk EMEA Technical Lead.

                  • 6. Re: Recurring Scheduled Tasks Become Unscheduled

                    Thanks for the response, Paul.


                    The reasons for the delay in SP2 are that it was scheduled back in November, I believe, but then the alert came out to wait for 2a, and it lost its place in the queue.   We have a strict DEV/QA/PROD cycle here with updates and rollouts, and limited resources to accomplish the workload.


                    The good news is that in desperation I deleted all of my tasks, including the three which would not stay scheduled (they did have different names, in case that's a factor.   I know they're numbered) and recreated the three I need now.   The weekly task ran last night and still appears to be scheduled for next week.


                    To answer your questions, the Dev Core is separate and in a separate GPO, which to my knowledge hasn't changed recently.  We started from scratch with a fresh database in 8.8 in both Dev and PROD and both have run fine for several months now.  However, we rarely run recurring tasks, so it's possible we just didn't pick up the issue until now.



                    I appreciate your help, but I guess since it appears to be working and we're behind the curve on updates, we should shelve this for now. Until we can get 2a applied and we can be sure it's not some transient problem, I don't want to waste any more of your time (or anyone else's here).   I know it makes things easier to troubleshoot when we're all on the same page.






                    • 7. Re: Recurring Scheduled Tasks Become Unscheduled
                      phoffmann SupportEmployee

                      Thanks for the explanation.


                      If the problem SHOULD reoccur, my instinct would be that there's something potentially broken in the DB -- not something that COREDBUTIL can get out, but a likely guess would be that there's something in the scheduler-related tables is busted.


                      This MAY or may not be fixable - one would need to see (but either way, it should be duplicable I reckon with the DB, if my suspicion is correct).


                      Keep an eye out for this, and at least there's a decent enough path for you to follow now should the issue reoccur .


                      Take care.


                      Paul Hoffmann

                      LANDesk EMEA Technical Lead

                      • 8. Re: Recurring Scheduled Tasks Become Unscheduled

                        Hello, I have the same problem on LDMS 8.7 SP6.


                        A scheduled task which call this script:


                        ;  LANDesk(R) Management Suite Custom Script

                        ; JOBPARAM = Controls various configuration options on a per script basis. 
                        ; The following is a sample of what this section might look like:
                        ;    [JOBPARAM]
                        ;    MAX_CUST_JOB_THREADS=120
                        ;    MAX_MULTICAST_THREADS=10
                        ;    MAX_MC_FAILURE_THREADS=60
                        ;    STEPS=1
                        ;    TASK_COMPLETION_ENABLED=FALSE

                        ; PREMACHINE - Processed once at start of job.  Only the local (LOCxxx)
                        ; commands can be used in this section.  Use this section as well for
                        ; jobs with no associated machines.

                        ; MULTICAST - This section is used to control the targeted multicast.

                        ; MACHINES - This section is run once for each machine in the target set. 
                        ; Commands in this section will be processed in the order they are listed
                        ; in the custom script.  This section supports both local (LOCxxx) and remote
                        ; (REMxxx) commands.
                        REMEXEC0=poweroff.exe 600 /F


                        I would like to repeat this task every day at 23h:



                        The task start well but just 1 time, after it switch to Leave unscheduled.


                        I have nothing in the log, just this:

                        Task 14396, exitcode 6 has been translated to status 6.

                        Setting task 14396 status to 6.


                        Thanks in advance for your help!

                        • 9. Re: Recurring Scheduled Tasks Become Unscheduled
                          phoffmann SupportEmployee



                          Please note that 8.7 has been EOL (End-Of-Life) for quite a while:

                          -- http://community.landesk.com/support/docs/DOC-8994


                          Also the problem isn't really related to CUSTJOB (which your scripts use), but more to the global scheduler (which script-based tasks do NOT use).


                          As a simple enough workaround (since all you seem to do is shut down machines), might I recommend just using this as a local scheduler task? You could simply set a TOD (Time Of Day) filter to run between 23:00 and 24:00 for instance, and the clients would run the shutdown command themselves locally, without needing to be prodded by the Core.


                          - Paul Hoffmann

                          LANDesk EMEA Technical Lead

                          • 10. Re: Recurring Scheduled Tasks Become Unscheduled

                            OK, thank you for your reply!