Re: Newbie

From: Patrick J. Dughi (dughi@IMAXX.NET)
Date: 04/20/98


> > I also am cursed with a server that re-boots every day at a regular
> > time, so I have to re-run my mud.  Has anyone got an idea how to get
> > around this?  I asked my sysadmin and he suggested something called a
> > "cron job"  Until about 2 months ago I didn't know what UNIX was, let
> > alone how to run a mud...I have no idea what a cron job is or how to do
> > it, or if it'll even help me keep my mud up.
>
> By referring to a CRON JOB, the sysadmin basically means adding in the
> path to your MUDs executable to the bootup scripts, so that it will
> automatically restart whenever the server does(belive me, CRON is more
> complicated than that, and with it you can actually set things to run/be
> checked every day, hour, etc...but you get the idea).  As far as I know,
> however, your sysadmin has to add you to the CRON list.  Give him/her the
> path to your MUDs executable and they should be a ble to set it up for
> you.

        I'm in a foul mood, but this was funny, so I'll certainly help you
out here.  The sysadmin doesn't mean any path-relevant data in the bootup
scripts.  Matter of fact, he means to run a cron job.

        Try this: type 'crontab -e'

        On most systems you can edit your own cron jobs, and the syntax is
rather simplistic. On a few (HP-UX for example, the default is to allow
root only, unless the file /var/adm/cron/cron.deny exists, in which case
you can use it, unless your name is in there, unless there is a file
/var/adm/cron/cron.allow, in which case you'll have to have your name in
there.) you'll have to have sysadmin level intervention, but probably most
of you won't be running on these tighter systems.

Here's the 10 second syntax of a cron job:

           minute  hour  monthday  month  weekday  command

..
for example..
           0 0 * * * updatedb

will run the updatedb program as the user at midnight each day.

        0,5,10,15,20,25,30,35,40,45,50,55 * * * *  /home/mud/mudcheck

will run the program /home/mud/mudcheck every 5 minutes.

        Now, if you know when the server goes down every night, you could
have it execute the autorun script about 5-10 minutes after it goes down.
Of course, if it dosen't go down, you'll have nice continually looping
autorun scripts as the port is already occupied, and that pisses some
people off.  You can also write a script/program to check if the mud
actually is running, and if not to start it up.  Check out the Phoneix IRC
client thing that so many people seem to like downloading onto their
machines, I've had to clear out their hidden little .pHoNeIx directories a
few times, that I've noticed it does something along that route with a
script to keep it running through cron.

        Your other alternative, and this probably won't happen, is to have
the admin start the mud from the rc (bootup) scripts, but he's probably
have to know you to do that - its dangerous from his standpoint.

                                        PjD


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST