collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Auto Restart of the Bot  (Read 3895 times)

0 Members and 1 Guest are viewing this topic.

Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Auto Restart of the Bot
« 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

Offline Zweiblum

  • BeBot Apprentice
  • ***
  • Posts: 135
  • Karma: +0/-0
Re: Auto Restart of the Bot
« Reply #1 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.

Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Re: Auto Restart of the Bot
« Reply #2 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?

Offline Kentarii

  • BeBot Apprentice
  • ***
  • Posts: 153
  • Karma: +0/-0
    • AoC>TV
Re: Auto Restart of the Bot
« Reply #3 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/
« Last Edit: February 09, 2011, 05:38:47 pm by Kentarii »

Offline dillinger

  • BeBot Apprentice
  • ***
  • Posts: 91
  • Karma: +0/-0
Re: Auto Restart of the Bot
« Reply #4 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

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 282
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal