BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => AoC 0.6 support => Topic started by: dillinger on February 08, 2011, 08:13:23 pm

Title: Auto Restart of the Bot
Post by: dillinger on February 08, 2011, 08:13:23 pm
Hi folks

I was wondering how I can set an "automatic restart function" to the bot. All I want is that the bot is restarting automatically at 04.00 a.m.

Can I handle this via cron- scripts?

Any idea?

Thanx, dill
Title: Re: Auto Restart of the Bot
Post by: Zweiblum on February 09, 2011, 06:22:30 am
im not realy into linuxsystems, but i would wright a shellscript wich "kill"s the process oft he bot "php StartBot.php Bot" and restarts it.
Or if u use the bot_check script from the forums u just could add a kill line into the crontab i would think and let the bot_check script do the rest.
Title: Re: Auto Restart of the Bot
Post by: dillinger on February 09, 2011, 09:13:53 am
I'm using my bot under a W2k8 server, so I'm a little bit limited by using the shell! :)

Killing and relaunching the StartBot.bat file is easy but looks quite unattractive to me; a time scheduled task wich will send the !restart command every 8 hrs would be great!

Ideas?
Title: Re: Auto Restart of the Bot
Post by: Kentarii on February 09, 2011, 04:59:38 pm
If you're a coder, you can write a module which run bot cron jobs at scheduled intervals which calls $this -> bot -> reconnect().

Why do you need to restart it btw?

Edit: wrote a simple module for you, hope it works like you expected.
http://bebot.link/aoc-0-6-x-customunofficial-modules/autoreconnect-module-for-bebot/
Title: Re: Auto Restart of the Bot
Post by: dillinger on February 10, 2011, 08:03:22 am
Hi Kentarii

Thanx for your work, very nice! This is exactly what I'm looking for!

I need this function for testing purpose.

Kind regards, dill
SimplePortal 2.3.7 © 2008-2024, SimplePortal