Jump to content

server restart at certian time


matrix4583

Recommended Posts

i found a script from one of the thread, but i don't know where to put this script in. Here is a scriptl;

 

<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.GetServices()

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>

 

Also, how do i make certian time to restart every server?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Who's Online   0 Members, 0 Anonymous, 4 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use