tinear10 1 Posted February 2, 2014 Report Share Posted February 2, 2014 I apologize if this has been answered before. I tried several searches on the forum. I have a bot I need to run 24/7 on a VPS. Is there a way to be notified if the bot stops running? I have thought about making the bot send me emails avery 15 minutes but that would get quickly get old. I am sure you have come up with a more elegant solution. Thank you,Matt Quote Link to post Share on other sites
nuc63 27 Posted February 2, 2014 Report Share Posted February 2, 2014 You can input a variable into a MySQL database and use a cronjob to check. A lot of scripts are available in php for this. In bot have a thread that does only update something every x mins. Have cronjob check and email if needed Quote Link to post Share on other sites
Bot-Factory 602 Posted February 2, 2014 Report Share Posted February 2, 2014 Hi. There are different ways to solve that problem. Do you want to just get informed or do you want to trigger an automatic action? There are a couple of things to consider:1. If the bot stops working, it will not notify you. 2. The executable could stop. But it could also be, that it's still running but it's not working correctly. So to be on the save side you have to detect app failures but also logical errors. 3. If your bot only executes a short task and then waits for the next run, you could easily just start and stop the bot every time via a scheduler.That's what I do when I need to run something on a server. Dan Quote Link to post Share on other sites
Edward_2 85 Posted February 2, 2014 Report Share Posted February 2, 2014 Have the bot save a text file every 10 minutes with a time it last ran. Have a script/bot open and check this text file to see if the correct time is saved, if not run a batch file to close and restart the bot, then close the checking bot. Quote Link to post Share on other sites
jamesfar 15 Posted February 5, 2014 Report Share Posted February 5, 2014 Have the bot send you email once a day at the end of the code line. Then if you don't found the email on a day then you know there is something wrong Quote Link to post Share on other sites
tinear10 1 Posted February 10, 2014 Author Report Share Posted February 10, 2014 Very good ideas! Thank you Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.