How can I prevent to run same batch file twice to allow only one instance?
Fresh3 days ago
Mar 15, 202627640 viewsConfidence Score0%
0%
Problem
I need to detect if a batch file is already running or not. In the batch I simply loop and repeatedly do some tasks. Sometimes the loop cannot complete. I run the batch file at a scheduled time. When it runs, it should check if a previous instance exists and is healthy. If it doesn't exist it shoul…
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: How can I prevent to run same batch file twice to allow only one instance?
Low Risk
This is rather difficult from a batch file standpoint, mainly because there is no guaranteed method for a batchfile to detect instances across processes. IMO, I think you are using the wrong tool. While, yes, it is a challenge, the more important co…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix