PDA

View Full Version : Cronjob for checking on world and zones


TheClaus
06-07-2002, 10:04 AM
I am looking for a script that will check to see if world is running or not. If not then it restarts both the world and zones. If it is running then it waits til the next time. Something to throw in my cron.hourly. Can it be done and if so how. I am using the eqemud that is in a thread.

Thanks

TheClaus

Trumpcard
06-07-2002, 12:27 PM
Hmmm, use daemon to start the processes, (use one of the other init.d startup scripts as a model). Then just write out a pid file to /var/run or something, have a cron.hourly job that ps -ef | grep pid#, if it doesnt find anything, have it run the init.d startup script.

Shouldnt be too hard to make. I'd make a shorter term cron though, I created a cron.tenminute job and stuck it into crontab so i could update my dns ip on a more regular basis. Waiting an hour for my ip to update is a bit long.

Anyways, just a suggestion. Ive thought about doing it for awhile, but I want to wait for things to stabilize out a bit before I start running a 24/7 server.

bot403
06-08-2002, 08:04 AM
IVE GOT THE SOLUTION
:)
Check this thread out

http://www.eqemu.net/forums/showthread.php?s=&threadid=2473