• 0
Sign in to follow this  
Followers 0
Ton_41

[SOLVED] How to set auto restart server

Question

my server not will auto restart server 
 

class RCON
    {
        /*
            Note that for this to work you need to have serverCommandPassowrd defined in config.cfg and BE enabled
        */

        // This needs to match config.cfg serverCommandPassword
        serverPassword = "***** mypassworld******";

        // Autolocks server until its ready to accept players
        useAutoLock = 0;

        // Server will autoLock at that time before restart (minutes)
        restartAutoLock = 3;

        /*
            Number of hours and minutes of your restart period.

            Examples:

            {4, 0} = Every 4 hours
            {1, 30} = Every one and a half hour (who the hell would do this?)
        */
        restartTimer[] = {4, 0};

        /*
            Kicks players before restart to prevent gear loss.
            We strongely recommend to use this!

            0 = off
            1 = on
        */
        useAutoKick = 1;

        /*
            Number of minutes before the server kicks players that did
            not disconnect before the restart. Should at least be two
            minutes!
        */
        kickTime = 2;

        /*
            Self-explanatory

            0 = off
            1 = on
        */
        useRestartMessages = 1;

        /*
            Number of minutes before the restart to inform your players.

            Only use full minutes here. Value like 5.5 have not been tested.
        */
        restartWarningTime[] = {15, 10, 5, 3}; 

        /* 
            If set to 1 server will execute '#shutdown',
            to try to shutdown the server
        */

        useShutdown = 1;
    };

Share this post


Link to post
Share on other sites

6 answers to this question

  • 0

Server run along time over 4 hrs. But server not auto restart. How to config that

Share this post


Link to post
Share on other sites
Advertisement
  • 0

You also need to set up your BEC Scheduler.  Once that was configured, mine worked. 

Share this post


Link to post
Share on other sites
  • 0

This goes in your BEC\Config\Scheduler.xml 

<Scheduler>
    <job id="0">
        <start>034500</start>
        <runtime>000000</runtime>
        <day>1,2,3,4,5,6,7</day>
        <loop>0</loop>
        <cmd>say -1 Server Restart in 15 Minutes!</cmd>
    </job>
    <job id="1">
        <start>035000</start>
        <runtime>000000</runtime>
        <day>1,2,3,4,5,6,7</day>
        <loop>0</loop>
        <cmd>say -1 Server Restart in 10 Minutes!</cmd>
    </job>
    <job id="2">
        <start>035500</start>
        <runtime>000000</runtime>
        <day>1,2,3,4,5,6,7</day>
        <loop>0</loop>
        <cmd>say -1 Server Restart in 5 Minutes!</cmd>
    </job>
    <job id="3">
        <start>035800</start>
        <runtime>000000</runtime>
        <day>1,2,3,4,5,6,7</day>
        <loop>0</loop>
        <cmd>say -1 Server Restart in 2 Minutes! LOGOUT NOW!</cmd>
    </job>
    <job id="4">
        <start>040000</start>
        <runtime>000000</runtime>
        <day>1,2,3,4,5,6,7</day>
        <loop>0</loop>
        <cmd>#shutdown</cmd>
    </job>
</Scheduler>

Share this post


Link to post
Share on other sites
  • 0

We have closed this thread and marked it as solved.

Share this post


Link to post
Share on other sites
Advertisement
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.