Closed Yanush7 closed 8 years ago
I created a cmd file for this :) I'm still waiting for it to be added to the wiki :)
I created a shell for this which is useful. It's great to have this build-in feature.
Anything working for this for OSX? e.g. AppleScript? Would be amazing to leave this running whilst at work knowing it's going to be running still by the time I'm home. My thought was perhaps an Apple script that restarts the bot after every 30 minutes or so? I wouldn't imagine that would look too dodgy on niantic's servers and I imagine scheduling the restart would be a lot easier than detecting a crash/error, given there's no crashes and errors popping up every day or so.
@AlexBailey That Bash script works for both Linux and OS X !
Using Bash on OS X
#!/bin/bash
while true
do
./pokecli.py
echo ">pokecli exited... restarting...";
sleep 5;
done
But if you still want an AppleScript check this - https://github.com/PokemonGoF/PokemonGo-Bot/wiki/Restarting-bot(s)
@leovarmak so how often does this restart the bot? it's been running for 5 minutes and i've yet to see the echo message or a restart?
@AlexBailey This script restarts the bot whenever it crashes. So you can run it all night without actually having to worry about the 'What if the bot stops ? '
@leovarmak So it will detect both a connection error or a crash and will keep restarting every 5 seconds?
@AlexBailey I am sure it will detect a crash. I have been using this since 2 days. Well I just gave the connection test a try and it works too ! So it will try to restart the bot every 5 seconds incase of a connection error and bot crash
@leovarmak has it ever failed on any occasion? seems like a pretty neat and tidy bash script
I don't remember it failing on OS X. But the BatchScript failed few times on Windows. Do give it a try man ! Let me know if you run into something
@leovarmak Cheers for the help, and will do! you should have credited @MeGaPk either way though - so thank you both for the help
@AlexBailey I forgot :p . @MeGaPk Thats for the code mate ! you really changed on how this bot works with a quick hack 👍
use the bash script...
Expected Behavior
Bot auto restart every time when it is closed (or x times specified as an option) so when you leave it for few hours you do not need to worry that after 10 min it crashed, and the rest of the hours when you were not knowing that it is not actually working are lost. It is more feature request than issue i guess?
Actual Behavior
Cant leave the bot for long time unattented because of some random closing.
Steps to Reproduce
Leave the bot working for 1, 2 r 3 hours
Other Information
OS: Windows 7 Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here)