View previous topic :: View next topic |
Author |
Message |
Rain Designs Tux's lil' helper
Joined: 01 Jul 2002 Posts: 130 Location: Los Angeles, CA
|
Posted: Mon Jul 01, 2002 6:03 pm Post subject: crontab :( |
|
|
I am running a gaming server as user alex. I have created a shell script that restarts the server if it crashes. So to restart the server, I just do this...
(hlds is the name of the server) Then the restart script starts the server back up again. I want to set up crontab to kill my server once a month. I tried this..
Code: | * * 1 * * root killall hlds |
to kill it the first of the month. It didn't seem to work. Is my code wrong? Thanks for the help in advance!
-Rain _________________ ^M = Death by notepad
http://www.raindesigns.com |
|
Back to top |
|
|
Naan Yaar Bodhisattva
Joined: 27 Jun 2002 Posts: 1549
|
Posted: Mon Jul 01, 2002 7:49 pm Post subject: Re: crontab :( |
|
|
Are you editing /etc/crontab or a user cron file? The "root" entry is needed only for /etc/crontab. Is /usr/bin on the PATH in crontab?
Rain Designs wrote: | I am running a gaming server as user alex. I have created a shell script that restarts the server if it crashes. So to restart the server, I just do this...
(hlds is the name of the server) Then the restart script starts the server back up again. I want to set up crontab to kill my server once a month. I tried this..
Code: | * * 1 * * root killall hlds |
to kill it the first of the month. It didn't seem to work. Is my code wrong? Thanks for the help in advance!
-Rain |
|
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Mon Jul 01, 2002 8:17 pm Post subject: |
|
|
Also, if it's actually crashed, do killall -9 to kill it forcefully. |
|
Back to top |
|
|
Rain Designs Tux's lil' helper
Joined: 01 Jul 2002 Posts: 130 Location: Los Angeles, CA
|
Posted: Mon Jul 01, 2002 8:17 pm Post subject: |
|
|
I'm not too sure. I logged in as alex and executed "crontab -e" I could look for you but I'm at work, and I don't have acess to SSH at the moment.
I am possitive that works, I just need to get it into crontab
Thanks
-Rain _________________ ^M = Death by notepad
http://www.raindesigns.com |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Mon Jul 01, 2002 8:26 pm Post subject: |
|
|
Then make it "* * 1 * * killall hlds" in the user's crontab and you should be good. |
|
Back to top |
|
|
Rain Designs Tux's lil' helper
Joined: 01 Jul 2002 Posts: 130 Location: Los Angeles, CA
|
|
Back to top |
|
|
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Tue Jul 02, 2002 5:22 pm Post subject: |
|
|
Won't "* * 1 * *" kill the server EVERY MINUTE on the first of the month? I don't think you want to do that. I'd have "0 0 1 * *" or something. Unless I'm mistaken. |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Tue Jul 02, 2002 5:23 pm Post subject: |
|
|
LOL, yeah, you're right.
That'd be funny. _________________ I don't believe in witty sigs. |
|
Back to top |
|
|
Rain Designs Tux's lil' helper
Joined: 01 Jul 2002 Posts: 130 Location: Los Angeles, CA
|
Posted: Tue Jul 02, 2002 6:19 pm Post subject: |
|
|
lol that would really suck. Thanks rizzo.
Code: | 0 0 1 * * killall hlds |
in the users crontab _________________ ^M = Death by notepad
http://www.raindesigns.com |
|
Back to top |
|
|
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Tue Jul 02, 2002 6:25 pm Post subject: |
|
|
No problem. Otherwise I'd hate to be playing half-life on your server on the 1st. Especially since it takes a long time to load the info once you try and join a server. Probably only have 15 seconds of actual game play. Once I'm done buying my flashbangs the game will end. Actually that might be a nice way to disguise my lack of skills. |
|
Back to top |
|
|
Rain Designs Tux's lil' helper
Joined: 01 Jul 2002 Posts: 130 Location: Los Angeles, CA
|
Posted: Tue Jul 02, 2002 6:39 pm Post subject: |
|
|
HAHAHAHAHAHA good stuff!
But believe me, I'm worse than you, lol thats why I became an admin. So when people say I suck, I just kick em!
If your interested, its running cs and when it comes back up, you should connect! 66.12.66.86 _________________ ^M = Death by notepad
http://www.raindesigns.com |
|
Back to top |
|
|
|