|
Post by jerrymotov on Mar 26, 2016 15:55:28 GMT
I've got an simple bot restarter.
@echo off
:loop
start "Name of bot E.G. Bot" "Location of your bot e.g. C:\User\downloads\UniBot.exe"
You can add multiple bots. timeout /t 300 >null Timer. This one restarts after 300 seconds which equals 5 minutes. You can increase/decrease this if you want taskkill /f /im "Name of the process here" >nul (Taskmanagar > Processes > Right mouse click on the process of your bot > details you'll now see the name of the process.
taskkill /f /im "WerFault.exe" >nul this closes the error. (sometimes the bot crashes and it gives a error) timeout /t 7 >null
goto loop
Hope y'all understand it! Feel free to ask me any question! How to use: Create a text file. Paste the text. Enter your bot info. Now press save as Save ass: all files Filename whateveryouwant.bat don't forget to save it as .bat otherwise it WON'T WORK!
@echo off :loop start "FileName" "C:\location of bot" timeout /t 300 >null taskkill /f /im "Name of process e.g. bot.exe" >nul taskkill /f /im "WerFault.exe" >nul timeout /t 7 >null goto loop
|
|
|
Post by MikiSoft on Mar 26, 2016 17:50:57 GMT
Good, but I think that this is just a redundant thing to do. If you want for some reason to restart a bot periodically, then you can just define before creating an EXE bot in Fine tuning dialog to automatically stop the process after some time, and then you can either: - Use Auto-save & exec. Batch option where you (can skip the part of saving log and output but) specify the Batch command at the end, which will call the bot to start itself again on exit:
start "" "%TFilename%" - Make a Batch script (file, eg: RunMe.bat) which will be like this (where "My bot" is the name of the EXE bot file of course):
:a start /w "" "My bot.exe" goto a Which will do the same but it will be better way because it will depend on itself and not on the EXE bot, so if the bot crashes for some reason it will be executed again.
|
|
|
Post by jerrymotov on Mar 26, 2016 19:53:47 GMT
I agree that it's better to restart the bot when it crashes However that didn't work for me. If the bot crashes it gives me an popup. My pc won't detect that it's crashed if the popup comes. (tried this with an application named RestartOnCrash) So that's why I decided to go with a timer.
|
|