Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
prathapg1959
Contributor III
Contributor III

How to avoid multiple instance of batch file running - (Reloading qlikview application via batch file)

Hi Team,

I have created the PRJ_Folder_Creation.qvw application to create prj folders and running via batch script. It is common application for all team members. So multiple instance created when more then one team member execute the batch file at same time.

Batch Script: PRJ_Folder_Creation.bat

C:\Program Files\QlikView\Qv.exe" /r "D:\PRJ_Folder_Creation.qvw"

Batch file has to execute based on condition,  have to check PRJ_Folder_Creation.bat is already 'running' or 'not'.

If it is running have to trigger a msg as ' Already running, Please try some time later'  and batch has to exit, If it is not running has to start above mentioned batch script.

Please suggest to handle this issue. Suggestions are appreciated.

Thanks

2 Solutions

Accepted Solutions
rubenmarin

Hi, maybe there is a better way but I woud try creating a file when the bat starts and delete it when it ends, the 2nd bat can check if the file exists, in that case the first bat is still running.

View solution in original post

prathapg1959
Contributor III
Contributor III
Author

Hi Rubenmarin,

I tried your suggestion and It is working for me. Thanks for tricky solution.

 

View solution in original post

2 Replies
rubenmarin

Hi, maybe there is a better way but I woud try creating a file when the bat starts and delete it when it ends, the 2nd bat can check if the file exists, in that case the first bat is still running.

prathapg1959
Contributor III
Contributor III
Author

Hi Rubenmarin,

I tried your suggestion and It is working for me. Thanks for tricky solution.