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.
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)
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).