Raised This Month: $ Target: $400
 0% 

[REQ] Server 24 hour reboot script


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ottobohn
Senior Member
Join Date: Sep 2007
Old 02-14-2008 , 12:48   [REQ] Server 24 hour reboot script
Reply With Quote #1

We really need a plugin that'll reboot the server every 24 hours or specified time.

We use ace reboot for eventscripts and we'd like to get away from eventscripts entirely please

Otto
ottobohn is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 02-14-2008 , 13:24   Re: [REQ] Server 24 hour reboot script
Reply With Quote #2

Can you paste the eventscript code here, please? Also, do your servers auto-reboot when they are closed/crash?
bl4nk is offline
Extreme_One
Veteran Member
Join Date: Nov 2006
Old 02-14-2008 , 15:31   Re: [REQ] Server 24 hour reboot script
Reply With Quote #3

Plugin here: Server Crontab

Config file goes here:
tf/cfg/sourcemod/sc_jobs.cfg

Code:
//
// Basic Server Crontab configuration file
//
// # = Weekday Start. Format is 0 = Sunday to 6 = Saturday
//
// # # = Weekday End. Format is 0 = Sunday to 6 = Saturday
//
// # # # = Start hour of the day. The hour is in 24h format (0-23)
//
// # # # # = End hour of the day. The hour is in 24h format (0-23)
//
// # # # # # = Start minute of the hour (0-59)
//
// # # # # # # = End minute of the hour (0-59)
//
// Use ? to ignore the current weekday/hour/minute
//
//

// Reboot the server everyday of the week at 5am
sc_addjob ? ? 05 05 00 00 "quit"
__________________
Extreme_One is offline
ottobohn
Senior Member
Join Date: Sep 2007
Old 02-14-2008 , 17:24   Re: [REQ] Server 24 hour reboot script
Reply With Quote #4

That's exactly what I need. You guys rock my socks.

Otto
ottobohn is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 02-14-2008 , 22:21   Re: [REQ] Server 24 hour reboot script
Reply With Quote #5

Are you wearing socks? lol
__________________

DontWannaName is offline
LocutusH
Senior Member
Join Date: Dec 2007
Location: Hungary
Old 02-15-2008 , 15:29   Re: [REQ] Server 24 hour reboot script
Reply With Quote #6

I think rebooting the srcds, without killing it doesnt help on the memory leak issue, wich is i assume the reason you are trying this.


You should do a kill+start from crontab with a shell script, to do it properly.
__________________
LocutusH is offline
ottobohn
Senior Member
Join Date: Sep 2007
Old 02-15-2008 , 15:35   Re: [REQ] Server 24 hour reboot script
Reply With Quote #7

Event script does fix the memory leak actually.

ace reboot

otto
ottobohn is offline
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 02-15-2008 , 19:21   Re: [REQ] Server 24 hour reboot script
Reply With Quote #8

You shouldn't use quit to restart a source dedicated server, the srcds_run script will detect that it was killed on purpose and not restart it exept somebody modified that script or created an additional restart/monitoring system. The recommended command is _restart which will kill the actual gameserver binary and the srcds_run script keeps running and restarts the binary automatically.
sfPlayer is offline
Extreme_One
Veteran Member
Join Date: Nov 2006
Old 02-16-2008 , 06:23   Re: [REQ] Server 24 hour reboot script
Reply With Quote #9

Quote:
Originally Posted by sfPlayer View Post
You shouldn't use quit to restart a source dedicated server, the srcds_run script will detect that it was killed on purpose and not restart it exept somebody modified that script or created an additional restart/monitoring system. The recommended command is _restart which will kill the actual gameserver binary and the srcds_run script keeps running and restarts the binary automatically.
thanks for the tip.

Changed my tf/cfg/sourcemod/sc_jobs.cfgto:

Code:
//
// Basic Server Crontab configuration file
//
// # = Weekday Start. Format is 0 = Sunday to 6 = Saturday
//
// # # = Weekday End. Format is 0 = Sunday to 6 = Saturday
//
// # # # = Start hour of the day. The hour is in 24h format (0-23)
//
// # # # # = End hour of the day. The hour is in 24h format (0-23)
//
// # # # # # = Start minute of the hour (0-59)
//
// # # # # # # = End minute of the hour (0-59)
//
// Use ? to ignore the current weekday/hour/minute
//
//

// Reboot the server everyday of the week at 5am
sc_addjob ? ? 05 05 00 00 "_restart"
__________________
Extreme_One is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode