Forum Discussion
14 minutes ago, Mike Moniz said:As a side note, it's also generally it's better to make checks generic using tokens/properties rather then hard code values into the code.
^^^Most definitely.
Also, are you running in batchscript or script mode. One thing you can do when individual instances take longer to finish is use script instead of batchscript. The difference is that batchscript runs one script to gather all the data with a single, pretty low, timeout. That timeout is susceptible to the issues @Mike Moniz mentioned. However, if you use Script instead, the collector gets one task for each instance. Each instance would have its own timeout. This would mean that you'd have 1 minute (or 2, i'd have to check the default config) for a single path to be checked. When using script, you get a token, ##WILDVALUE## that contains the wildvalue of the current instance.
So, instead of your
foreach ($path in $paths)
you'd just do
$path = "##WILDVALUE##"
TL;DR: BATCHSCRIPT is not the only multi-instance option. Script is also an option, especially when individual instances take a long time to complete.
Related Content
- 8 months ago
- 11 months ago