Update for Wiki
Hey,
So I have created a cmd file which starts the bot, and restarts upon crash. I noticed there is a Wiki page (https://github.com/PokemonGoF/PokemonGo-Bot/wiki/Restarting-bot(s)), I'm however not allowed to edit the page.
Therefore, I'll update it here, in hope a moderator could fix it for me upon approval.
The following code applies to the 'dev' branch where a new configuration architecture is handled.
- Go to the root of your PokemonGo bot
- Richt-click inside the folder and create a new file, named something like "PokemonGo.cmd"
- Richt-click the file you just created, and click the 'Edit' option
- Copy paste the following code inside the file
- Save the file, and you're ready to go!
:Execute
@echo (%date% %time%) Initiating PokemonGo
python ./pokecli.py --config ./configs/config.json
IF ERRORLEVEL 1 GOTO :RETRY
:RETRY
@echo (%date% %time%) Ooooops, there was an error, let us try again!
GOTO :Execute
There is an error in your CMD, I believe initiation line should be like this:
python ./pokecli.py --config ./configs/config.json
Without ./ it was not working for me (couldn`t find the file).
Might be a difference between Windows 7 and later versions. Edited the script :)