Restart server at x time

13 replies [Last post]
CANDYMAN
candyman's picture
Offline
Joined: Aug 2010
Posts:

Hi guys some one can help me to make a script to can restart at x time the server every day? i search on google but no founded a script or something like that.
os linux

)[///DI50|¯)ER▄_
Offline
Joined: Jan 2011
Posts:
Re: Restart server at x time

not sure if this will help..On my old server i just used punkbuster with its timer.. then at around 3am had pb execute /quit command, but I think my host had a script to reboot quake if that was done. Maybe yours does too?Instead of pb timer you'd just use the crontab.txt to execute.

CANDYMAN
candyman's picture
Offline
Joined: Aug 2010
Posts:
Re: Restart server at x time
)[///DI50|¯)ER▄_ wrote:

not sure if this will help..On my old server i just used punkbuster with its timer.. then at around 3am had pb execute /quit command, but I think my host had a script to reboot quake if that was done. Maybe yours does too?Instead of pb timer you'd just use the crontab.txt to execute.

i have a script on my server to can reboot the server by quit.... rcon quit.... so if i can do a script with this command i can do all Tongue the problem is to set the time and how..

)[///DI50|¯)ER▄_
Offline
Joined: Jan 2011
Posts:
Re: Restart server at x time

well if you run pb you can do it this way for sure
pb_sv_task 86400 0 quit

86400 being 24hrs in secs and pb starts time when server starts. so you'd start the server at the time you'd want it to reboot at.

hope this helps.-dis

CANDYMAN
candyman's picture
Offline
Joined: Aug 2010
Posts:
Re: Restart server at x time
)[///DI50|¯)ER▄_ wrote:

well if you run pb you can do it this way for sure
pb_sv_task 86400 0 quit

86400 being 24hrs in secs and pb starts time when server starts. so you'd start the server at the time you'd want it to reboot at.

hope this helps.-dis

thanks anyway but i wanna a script without use the pb to restart.. maybe by cronotab

rUnThEoN?!
Skullheadq3's picture
Offline
Joined: Dec 2005
Posts:
DE Germany
Re: Restart server at x time

if you use some other binarys you can run 24/7/12

hurrenson: "This idiot is apparently not familiar with a rail/sniper style."

^t
smasherchif's picture
Offline
Joined: Oct 2009
Posts:
Re: Restart server at x time
CANDYMAN wrote:

i have a script on my server to can reboot the server by quit.... rcon quit.... so if i can do a script with this command i can do all Tongue the problem is to set the time and how..

if so, then put this line to your crontab.txt:
0 5 * * *       /quit

'5' means 5 o'clock in the morning


.aNk/xXxp4l/:bR.Shady'XYN! wrote:
Fuck! I just thought of the most awesome pun about the BC vs Smurfs final game and the flames that followed :
"In Soviet Moldavia, Pole rages YOU"
like 2 months after Call me

3M'darkangel wrote:
// 09:30:49 27.06.2010, UNKNOWN LOCATION,
Name { "Biotoxin" }
IP { "localhost" }

SHUDDER wrote:
People are training hard to hide their autoshoot so well while gain enough skills to win (or at least compete on similar level) without them. This is getting insane or provoked. I feel like I would cut myself with Ockham's Razor if I claim a cheat there.

)[///DI50|¯)ER▄_
Offline
Joined: Jan 2011
Posts:
Re: Restart server at x time
^t wrote:


if so, then put this line to your crontab.txt:
0 5 * * *       /quit

'5' means 5 o'clock in the morning

also make sure this is in your server config file .. xp_crontab "crontab.txt"

CANDYMAN
candyman's picture
Offline
Joined: Aug 2010
Posts:
Re: Restart server at x time
^t wrote:

CANDYMAN wrote:
i have a script on my server to can reboot the server by quit.... rcon quit.... so if i can do a script with this command i can do all Tongue the problem is to set the time and how..

if so, then put this line to your crontab.txt:
0 5 * * *       /quit

'5' means 5 o'clock in the morning

mmm and it's a rcon command?

CANDYMAN
candyman's picture
Offline
Joined: Aug 2010
Posts:
Re: Restart server at x time
CANDYMAN wrote:

^t wrote:
CANDYMAN wrote:
i have a script on my server to can reboot the server by quit.... rcon quit.... so if i can do a script with this command i can do all Tongue the problem is to set the time and how..

if so, then put this line to your crontab.txt:
0 5 * * *       /quit

'5' means 5 o'clock in the morning

mmm and it's a rcon command?

and if i will make a script called restart like rconpassword blalba , wait , rcon quit.. and in crontab exec restart?

SHUDDER
shudder's picture
Offline
Joined: Feb 2010
Posts:
Re: Restart server at x time

"rcon" stands for "remote console" to make changes on server with commands sent from clients console - no need to use it in scripts uploaded on server.

You can execute script in crontab with /exec restart.cfg,
but your script would have only quit command in it.
Do you also want to have a "shortcut" for (de)activating this restart feature?