

InterviewSolution
Saved Bookmarks
1. |
Solve : Batch request? |
Answer» <html><body><p>Hi I am not good with creating <a href="https://interviewquestions.tuteehub.com/tag/batch-893737" style="font-weight:bold;" target="_blank" title="Click to know more about BATCH">BATCH</a>, I need <a href="https://interviewquestions.tuteehub.com/tag/assistance-886019" style="font-weight:bold;" target="_blank" title="Click to know more about ASSISTANCE">ASSISTANCE</a> creating one. Everytime my application crashes it leaves a log file, using that LOG file I want to restart the application by killing all processes first and then execute them again. If possible please help. <br/><br/>Here is what I need.<br/><br/>I want to create a batch which I will schedule to run every 1 minute or 2, it will check and do following:<br/><br/>1. Check if C:\MyFolder\Myfile.txt Exist <-- This is the trigger if log file is generated meaning the application got <a href="https://interviewquestions.tuteehub.com/tag/crashed-2552890" style="font-weight:bold;" target="_blank" title="Click to know more about CRASHED">CRASHED</a>, must get restarted.<br/>2. If TRUE then kill all process <a href="https://interviewquestions.tuteehub.com/tag/named-1110438" style="font-weight:bold;" target="_blank" title="Click to know more about NAMED">NAMED</a> as MyApplication.exe (There are atleast 4 - 5 instances running, I want to terminate all)<br/>3. Once terminate then run three instances.<br/>4. Run 1st instance "C:\Program Files (x86)\Application\application.exe" FirstInstance Parameters - Wait for <a href="https://interviewquestions.tuteehub.com/tag/60-242050" style="font-weight:bold;" target="_blank" title="Click to know more about 60">60</a> seconds<br/>5. Run 2nd instance "C:\Program Files (x86)\Application\application.exe" SecondInstance Paraameters - Wait for 60 seconds<br/>6. Run 3rd instance "C:\Program Files (x86)\Application\application.exe" ThirdInstance Parameters - Wait for 60 seconds<br/>7. Delete C:\MyFolder\Myfile.txt <br/>Exit<br/><br/>When I say Parameters my application has three different shortcuts on desktop when we execute, each have different parameters something like:<br/><br/>"C:\Program Files (x86)\MyApplication\Application.exe" SYS=PROD ATP=NPL <br/><br/>Thanks alot<br/>BablooNevermind managed to create the batch to full fill the requirements.<br/><br/>Thank you.<br/></p></body></html> | |