8 Replies Latest reply: Oct 6, 2014 8:23 AM by larfun RSS

    How to create a report of a scheduled task

    Sundiata Kita-Bradshaw Apprentice

      I would like to get daily reports of some of my scheduled tasks. I do not see this option in LANDesk Reporting- just an option to select a query. I am trying to avoid having to create a query based on the task just to get these reports. I would like the report to have the same information as when you click on a scheduled task and get a summary (Name(status), Quantity, Percentage).

       

      I have just started to learn SQL and have been trying queries on the LD_TASK table in the DB but am not getting anywhere.

       

      I did find this article which was interesting but still not what I am looking for. Does anyone know how I can accomplish this?

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

       

      Thanks!

        • 1. Re: How to create a report of a scheduled task
          v.taillet Apprentice

          Hello,

           

          I'm looking for a report for same thing : I need to have a report of a scheduled tasks' results (which computer failed, etc)

           

          Thanks

          • 2. Re: How to create a report of a scheduled task
            Sundiata Kita-Bradshaw Apprentice

            v.taillet:

             

            In case you never got this report, I learned enough SQL last Fall to created these reports in Report Designer. Let me know if you would like these SQL queries

            • 3. Re: How to create a report of a scheduled task
              zman Master

              Why not consider posting them here?

              • 4. Re: How to create a report of a scheduled task
                v.taillet Apprentice

                Hello,

                Yes I still need that report

                I have nearly the good report, but the error code description is missing (so I just have code error number, not very explicit !)

                 

                Thanks in advance

                • 5. Re: How to create a report of a scheduled task
                  Sundiata Kita-Bradshaw Apprentice

                  So sorry about the delay. I set a filter on my community subscription e-mails to keep my Inbox smaller but I forgot to keep an eye on my LANDesk folder  .

                   

                  This may be an example of what you are looking for, which has now worked for me. I am using this to keep track of a a policy task for Microsoft Office. Also, these are the only status codes that are listed in our database so I do not know if anymore exist. I was surprised to not find one to define "Active". This list is different to the status code document that was created in 2008:

                   

                  --------------------------

                   

                   

                  Select A0.Displayname as "Computer Name",CONVERT(varchar, CAST(InstallDate as DATE), 101) as "Install Date",  CONVERT(varchar, LastUpdInvSvr, 101) as "Last Inventory Update",
                  'Task Status' = Case
                  WHEN A2.MAC_STATUS = '0' THEN 'Waiting'
                  WHEN A2.MAC_STATUS = '2' THEN 'Done'
                  WHEN A2.MAC_STATUS = '3' THEN 'Failed'
                  WHEN A2.MAC_STATUS = '7' THEN 'Off'
                  WHEN A2.MAC_STATUS = '8' THEN 'Canceled'
                  WHEN A2.MAC_STATUS = '10' THEN 'Delayed'
                  WHEN A2.MAC_STATUS = '11' THEN 'Unknown Status Code'
                  END
                       from Computer A0
                  LEFT OUTER JOIN LD_TASK_MACHINE A2 ON A0.Computer_Idn = A2.COMPUTER_IDN
                  LEFT OUTER JOIN LD_TASK A1 ON A1.LD_TASK_IDN = A2.LD_TASK_IDN
                  LEFT OUTER JOIN TCP A3 ON A0.Computer_Idn = A3.Computer_Idn
                  LEFT OUTER JOIN AppSoftwareSuites A4 ON A0.Computer_Idn = A4.Computer_Idn
                  LEFT OUTER JOIN LanDesk A5 (nolock) ON A0.Computer_Idn = A5.Computer_Idn
                        WHERE A1.TASK_NAME = 'Microsoft Office 2010 Student'
                              and A4.SuiteName = 'Microsoft Office Professional Plus 2010'
                  order by [Task Status], [Last Inventory Update]

                   

                  -------------------------------------------

                  • 6. Re: How to create a report of a scheduled task
                    Sundiata Kita-Bradshaw Apprentice

                    I forgot to post this link with the query. This document had the most accurate results when I compared the codes to my tables. There were some other documents that I found but they did not match the code definitions.

                     

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

                    • 7. Re: How to create a report of a scheduled task
                      technobabble Apprentice

                      I get this error when I run the query. The task name is "Migrate to LDCSA Connection - Remote Automotive" and I have remove the AppsSuite line as it does not pertain to what I am searching for.

                       

                      Msg 156, Level 15, State 1, Line 20

                      Incorrect syntax near the keyword 'INNER'.

                       

                       

                      My SQL is:

                      use LANDesk

                      go

                       

                       

                      Select A0.Displayname as "Computer Name",CONVERT(varchar, CAST(InstallDate as DATE), 101) as "Install Date",  CONVERT(varchar, LastUpdInvSvr, 101) as "Last Inventory Update",

                      'Task Status' = Case

                      WHEN A2.MAC_STATUS = '0' THEN 'Waiting'

                      WHEN A2.MAC_STATUS = '2' THEN 'Done'

                      WHEN A2.MAC_STATUS = '3' THEN 'Failed'

                      WHEN A2.MAC_STATUS = '7' THEN 'Off'

                      WHEN A2.MAC_STATUS = '8' THEN 'Canceled'

                      WHEN A2.MAC_STATUS = '10' THEN 'Delayed'

                      WHEN A2.MAC_STATUS = '11' THEN 'Unknown Status Code'

                      END

                           from Computer A0

                      LEFT OUTER JOIN LD_TASK_MACHINE A2 ON A0.Computer_Idn = A2.COMPUTER_IDN

                      LEFT OUTER JOIN LD_TASK A1 ON A1.LD_TASK_IDN = A2.LD_TASK_IDN

                      LEFT OUTER JOIN TCP A3 ON A0.Computer_Idn = A3.Computer_Idn

                      LEFT OUTER JOIN AppSoftwareSuites A4 ON A0.Computer_Idn = A4.Computer_Idn

                      LEFT OUTER JOIN LanDesk A5 (nolock) ON A0.Computer_Idn = A5.Computer_Idn

                            WHERE A1.TASK_NAME = 'Migrate to LDCSA Connection - Remote Automotive'

                      order by [Task Status], [Last Inventory Update]

                       

                       

                      INNER JOIN LD_TASK ON ConsoleUser.ConsoleUser_Idn = LD_TASK.CONSOLEUSER_IDN

                      INNER JOIN DeliveryMethod ON LD_TASK.DELIVERYMETHOD_IDN = DeliveryMethod.DeliveryMethod_Idn

                      INNER JOIN PACKAGE ON LD_TASK.PACKAGE_IDN = PACKAGE.PACKAGE_IDN

                      ORDER BY ConsoleUser.UserName

                      • 8. Re: How to create a report of a scheduled task
                        larfun Apprentice

                        This might help. At the least you can look at the SQl behind it to see where the error might be.

                        New Software Distribution Status Summary Report w/Expandable Detail