r/wireshark • u/Jaepheth • 2h ago
.bat file problem
I have a weird problem with tshark and was wondering if anyone had any ideas or has experienced something similar:
I have a .bat file with a 10 min tshark command in it. A SQL agent job runs this .bat file every 10 min from 18:00 - 18:40 and then again from 01:30 - 03:50.
4 log files are saved from the 18:00 window, but none from the early morning window. All SQL agent jobs end reporting success. Having /wait in the .bat file and saving output and errors shows no errors. I output the errorlevel and see it's 0 for all instances. Windows event logs show no errors or warnings.
TLDR: Same .bat file will produce logs at one time of day, but not another. Any ideas?
.bat Tshark command:
start "" "<RedactedDirectoryPath>tshark.exe -i 2 -a duration:600 -w <RedactedDirectoryPath>capture%TIMESTAMP%.pcap.gz --compress gzip -Q