Thank you all for your input. I am going to try some of these things later on tonight.
First, let me preface this with what we are running. We are on 6.1.2.3 and running in Windows OS.
The goal of this script is to output statistics to folder in a csv format so another thread can grab these files and store them to a sql db.
In the usercmds folder under the root directory, I have two scripts. Transactioncountcycle.cmd and trans_to_file.tcl. The trans_to_file uses msiAttach to gather statistics for the current site you are on, and outputs to a csv. The Transactioncountcycle.cmd sets each site and runs the trans_to_file for each one. I had to do this because you cannot change sites when you use msiAttach in a single proc.
I have this UPoC that executes the Transactioncountcycle.cmd in our maintenance site, and whenever it’s run, it ignores the setsite command and runs the trans_to_file only fo the maintenance site. I am guessing that since the site the UPoC is on is considered the “parent environment” and it will not take change the sites based off child proc.
I am fortunate to also be attending Cloverleaf Intermediate class (with James D.) and the he advised that I could run a scheduled task to simply run the Transactioncountcycle.cmd. This should work and it is something I will try tonight. Props to James!
However, I would like to keep this all within Cloverleaf if possible, so if anyone has any other ideas, please let me know.
P.S. We are ALSO migrating to Linux, so we have a TEST environment under that OS. I was able to get this to work there using a sh that basically does the same thing as the Transactioncountcycle.cmd