Hey, you have a few options here you can update a custom property as a trigger action based on an criteria and based on the output change your custom properties
Or you could you a SQL agent job
To update a value based on the where filter ( I personally use )
Or you can use Orion SDK a mixture of swql and powershell that can run as a windows schedule
Could be some other ways but I like the second personally to update custom properties..
Depending on how you intend to use these properties, you could consider using the same logic that you want to create in a batch file for the creation of a group in SolarWinds. You may want to experiment a little bit with creation of groups based on dynamic queries.
Potentially leveraging the native functionality of dynamic queries/ groups would make a batch file unnecessary. Removing the batch file and task scheduler pieces removes two possible points of failure (in my experience these were broken with regularity by system administrators hardening the NPM servers). And you may be able to achieve your desired outcome entirely from web interface, without the need to RDP to your poller. A dynamic query will update group membership automatically based on your group definition. This is the "auto update" functionality you described.
These are 2 Powershell scripts that I have used to update Custom Properties via the API. One for the Node and one for an Application