dexion Posted December 23, 2006 Share Posted December 23, 2006 I saw the restart all servers scripts and they are great except i have servers spread across 3 timezones and would like to restart them at 7am at the specific timezone they are in. Can anyone show me how to modify the restart scrips to either: restart all services on box x (hopefully i can add in say the x boxes in california and make it 1 script, the x in nyc etc) then I only need to have 3 versions one for each timezone. OR even better, Restart all services in a specific datacenter location. Thanks dex Link to comment Share on other sites More sharing options...
ECF Posted December 23, 2006 Share Posted December 23, 2006 I will ask Luis to post something if it is possible. Link to comment Share on other sites More sharing options...
dexion Posted December 23, 2006 Author Share Posted December 23, 2006 great thanks Link to comment Share on other sites More sharing options...
dexion Posted December 30, 2006 Author Share Posted December 30, 2006 any news on this? Link to comment Share on other sites More sharing options...
ECF Posted December 31, 2006 Share Posted December 31, 2006 I mentioned it to Luis. I will ask him to look at it again. Link to comment Share on other sites More sharing options...
LFA Posted January 2, 2007 Share Posted January 2, 2007 Use this script: http://clientforums.tcadmin.com/showthread.php?t=201 Change this: Dim services() As Service = Service.GetServices() To this: Dim services() As Service = Service.GetServicesByServerId(TCAdminSDK.Info.GetThisServerId) Run the script on each server as a scheduled task at the time you want. It will only restart the services on that server. Link to comment Share on other sites More sharing options...
dexion Posted January 2, 2007 Author Share Posted January 2, 2007 ah great thanks dex Link to comment Share on other sites More sharing options...
dexion Posted January 18, 2007 Author Share Posted January 18, 2007 Ok i did that, ended up with: <tcascript> <language name="VB" /> <waitForUserAction value="true"/> <scriptCode><![CDATA[ Imports System Imports TCAdminSDK.Objects Public Class RestartGameServers Public Shared Sub Main() 'Get a list of all services Dim services() As Service = Service.GetServicesByServerId(TCAdminSDK.Info.GetThisServerId) for each s as Service in services If s.CurrentStatus = ServiceStatus.Running Then Console.WriteLine("Restarting " & s.ServiceID) s.Stop() Threading.Thread.CurrentThread.Sleep(1000) s.Start() 'Wait a few seconds before restarting the 'next service to avoid high loads on server Threading.Thread.CurrentThread.Sleep(10000) End If next Console.WriteLine("Done. Press any key to continue.") End Sub End Class ]]></scriptCode> </tcascript> Link to comment Share on other sites More sharing options...
kalyse Posted January 18, 2007 Share Posted January 18, 2007 You could just wait a week or so. This feature is being addded in the next update Link to comment Share on other sites More sharing options...
dexion Posted January 18, 2007 Author Share Posted January 18, 2007 thanks, darn good idea too if you ask me heh. Ive looked around, is there some place i can see the changes for the next release and release dates? Did i just miss it? Link to comment Share on other sites More sharing options...
ECF Posted January 18, 2007 Share Posted January 18, 2007 I showed a couple of the new features off in this thread. http://clientforums.tcadmin.com/showthread.php?t=1887 It has not been released yet. Luis is still adding things, and then it needs to be tested as well. Link to comment Share on other sites More sharing options...
dexion Posted January 18, 2007 Author Share Posted January 18, 2007 while that does look like i can restart the servers on the box on demand it doesnt appear that i can do it on a schedule. So, the script i was working on still seems like my best bet. Can anyone suggest a way to make it work *fixing the compile errors? Link to comment Share on other sites More sharing options...
LFA Posted January 18, 2007 Share Posted January 18, 2007 Remove the space in "GetThisServerId": TCAdminSDK.Info.GetT hisServerId Link to comment Share on other sites More sharing options...
dexion Posted January 18, 2007 Author Share Posted January 18, 2007 thanks, that was silly of me Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.