This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

[SOLVED] Crontabbing without autobotchk

General support and discussion of Eggdrop bots.
Post Reply
v
vigilant
Halfop
Posts: 48
Joined: Thu Jan 05, 2006 12:06 am

[SOLVED] Crontabbing without autobotchk

Post by vigilant »

How can i setup a crontab to check every 10 minutes without using autobotchk script hehe
I want to manually enter the botconfig or something
is that possible?

thanks 8)
Last edited by vigilant on Mon Dec 10, 2007 6:52 pm, edited 2 times in total.
Anser Quraishi
Website: http://www.anserq.com
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

It's probably easier to use autobotchk to set up as it grabs details from your bot configuration file.

Anyway, copy botchk from ~./eggdrop1.6.18/scripts to your bots main directory (where its running from).

Use pico/vi to edit where indicated (case matters).

Once done start the crontab editor (crontab -e) and insert the following (replacing with appropriate pathlist).

Code: Select all

0,10,20,30,40,50 * * * * /home/mydir/mybotdir/botchk >/dev/null 2>&1
Save and exit.

Note that botchk should be executable.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
CrazyCat
Revered One
Posts: 1299
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Code: Select all

*/10 * * * * /home/mydir/mybotdir/botchk >/dev/null 2>&1
is simpliest imho :D
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

CrazyCat wrote:

Code: Select all

*/10 * * * * /home/mydir/mybotdir/botchk >/dev/null 2>&1
is simpliest imho :D
Whatever. :?
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
v
vigilant
Halfop
Posts: 48
Joined: Thu Jan 05, 2006 12:06 am

Post by vigilant »

SO like in the botchk file, do i enter the details? heh?
I have customized configs. What information needs to go in the botchk file? isit like,
./eggdrop fullpath config
Anser Quraishi
Website: http://www.anserq.com
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Ok, this is easier considering we're not apparently going to read anything.

Code: Select all

./autobotchk
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
v
vigilant
Halfop
Posts: 48
Joined: Thu Jan 05, 2006 12:06 am

Post by vigilant »

When i run the autobotchk it doesnt work
I get $botnick2.botchk or something
And that file is empty? hehehe
and the crontab is also, /path/to/eggdrop/$botnick2.botchk

So i mean, I have editted the config you know, so it uses different variables.
I want to find a way to manually check for eggdrop running every 10 mins or so

I have tried to do this, but it doesn't work hehe

So anyone ever tried? That's my question if yes, then how to go abouts setting the crontab up.. thanks
Anser Quraishi
Website: http://www.anserq.com
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Uhm..considering that botchk is just a shell script, I see no reason you can't duplicate it, rename it, edit it, and do whatever else you want. As far as crontab, here's the manpage:
http://unixhelp.ed.ac.uk/CGI/man-cgi?crontab+5

cron will run anything you want. Read about proper crontab syntax.
v
vigilant
Halfop
Posts: 48
Joined: Thu Jan 05, 2006 12:06 am

Post by vigilant »

Hello, thanks for your reply.

I did setup an executable file which crontab would check for every 10 minutes. and run it ofcourse
but it wasnt doing that... hehehe
I did specify the proper syntax read the manpage
the file that crontab was running, contained, /home/vigilant/eggdrop config
and i tried various other things, so here is what im asking, a simple way to run eggie, this way wasnt working any idea why?

thanks :)
Anser Quraishi
Website: http://www.anserq.com
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Try re-reading my initial post?

From botchk:
# change this to the directory you run your bot from (capitalization COUNTS):
botdir="/home/mydir/mybot"

# change this to the name of your bot's config file (capitalization COUNTS):
botscript="mybot"

# change this to the botnet-nick of your bot (capitalization COUNTS):
botname="LamestBot"

# change this to the name of your bot's userfile (capitalization COUNTS):
userfile="LamestBot.user"

# change this to the name of your bot's pidfile (capitalization COUNTS):
pidfile="pid.LamestBot"
What is there to not understand?
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
v
vigilant
Halfop
Posts: 48
Joined: Thu Jan 05, 2006 12:06 am

Post by vigilant »

Now i understand.
THanks a lot Alchera dude.. :lol:
Anser Quraishi
Website: http://www.anserq.com
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Going to bed early helps with concentration btw. :wink:
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Post Reply