[Solved] Schedule Linked to a PDQ Inventory Dynamic Collection not Working as Expected
Hi
We would like to use PDQ Deploy to schedule a shutdown of computers based on their name and if they are not a member of a particular security group.
In PDQ Inventory I have created a dynamic collection under the (automatically created) Workstations collection called CityName - Desktops. The rule it uses is Computer - Starts With - CityName. This works and lists 97 machines.
I then have a child dynamic collection under this that drills down from the parent. Which says Not All - Member of AD Group Name - Equals - SecurityGroupNameHere. This lists 91 computers. So far this is what we are expecting to happen.
In PDQ Deploy I have created a package that runs the cmd shutdown.exe -s -t 0 -f. This is to shutdown a computer immediately and forcibly. If I test deploy this to individual PCs it works as expected. Again, so far so good.
Next I have created a schedule in PDQ Deploy called CityName - Shutdown PCs - Shutdown. This has been scheduled for weekdays at 20:00. For the targets I chose the option to link it to a PDQ Inventory collection.
Last night the schedule ran for the first time. I checked after 20:00 and the majority of PCs were still online that are in the linked to dynamic collection.
Because of this I then checked the deployment history and the targets are listed as 5. 3 of them succeeded, and 2 failed. The 2 failures were expected as I have a setting in the package for a ping test first, i.e. if the target is offline don't bother sending the shutdown command. This is where I don't understand what is happening, if we have a schedule in PDQ Deploy linked to a dynamic collection in PDQ Inventory that shows 91 members, then why did the scheduled deployment only attempt to deploy to 5? What about the other 86?
Comments
Make sure that first box is unchecked. If you tested individually the schedule is probably skipping them because it sees the previous successful deployment of your shutdown package.
Its on the Options tab of your schedule.
Hi Stephen
If that is the cause, that would make sense - I've now unticked that option on all recurring schedules that we want to run even if the job has succeeded in the past.
I'll update this thread once tested.
Thank you.
Hi Stephen
This resolved the issue, thank you.
Stephen - You've helped me too, thank you.
I was seeing only previously failed targets in new deployments. I had assumed it was one of the options set in Preferences, but unticking this fixed it for me.
Thanks!