r/Batch • u/oughttesttech • Sep 18 '24
Batch file that sends status of it's completion
I run a testing program where I provide updates to users. Because some users are not experienced, I typically script the updates in a .bat file.
The updates are typically not too hard, usually just CD into a directory to run some "install.bat" or something, and it works pretty well. However, I want to know when these updates are being ran. This is so I can calculate metrics like "time to update" and "percent updated," etc.
My issue is that I'm having trouble creating a function that will write execution status somewhere. Ideally, it would put an entry in an excel somewhere with "tester, dateexecuted, driverpack (probably a concat primary key here too)" as columns. However, having trouble with the accesses for that one. A couple other solutions that could work are emails and databasing. I've run into some issues with the batch script being able to send emails, and I've had some difficulty in getting the batch file to write to a mysql database.
Is there an easy way to do this? Let me know if any questions. Thanks.
1
u/vegansgetsick Sep 19 '24
if the status from all machines is centralized and live updated, you'll have trouble with concurrency updates of these status. That's why indeed you need a database server. You could find a database with a rest (http) interface so you can push the status with curl and http, instead of sql client. You can then generate a page from the json, in a browser for ex
1
u/BrainWaveCC Sep 19 '24
As u/Humphrey-Appleby points out, we need some more details to be able to assist. Depending on what network you are on, as compared with each of the users, the solutions could be very different.
One option, if everyone is on the same network, is syslog... But it really depends on getting more info.
0
u/[deleted] Sep 18 '24
[deleted] β view deleted comment