4 Replies Latest reply on Nov 9, 2010 1:57 PM by DanDinolfo

    Dynamic Query




      I was wondering if anyone can provide any thoughts on the following:


      We have a script/package that we would like to push based on a query. The results that are returned by the query change every week (or day).

      I would like the script/package to run on the results that are returned by the query every time is run. It would also be very nice to have the script not run again on the previous machines where the script ran sucessfully.  Is this possible?

      Not sure if I'm making any sense, but I can explain in more detail if necessary.


      Thank you very much.


        • 1. Re: Dynamic Query

          If you make your deployment job a policy every time your query adds new targets it will deploy your script to those systems the next time the system checks in to see if it has a pending job.


          If a job has already run and is successful.  it will not run on a system again unless you force it too.

          • 2. Re: Dynamic Query

            Thank you for your quick reply.

            Would you mind explaining this method step-by-step?

            Before i schedule anything, do i have to run any queries in the package itself?



            • 3. Re: Dynamic Query

              All policy deployments are initiated by the client.  In your agent config there is a setting that asks how often you want your machines to check for policies.  (Recommended: Every 8 hours)


              When you create an ldms query it resolves by default every hour.  They can be set to less or more time.  We recommend leaving it at 60 minutes.  This can be set under Configure | Services |Scheduler (Interval between query evaluation.


              A policy is a task that never has to be restarted.  as machines get added (dynamically) to the query and they meet the criteria they automatically become part of the task.  When the client checks in, the task is deployed.


              (You do not have to use the query option in the package for this)

              • 4. Re: Dynamic Query

                How do you set it so that if the software is removed (for whatever reason) it get's reinstalled?  (Using an MSI for example that has built-in detection).