Shutdown at specified time - Simple and Lightweight

Discussion in 'Archived: Plugin Requests' started by slayr288, Mar 26, 2013.

  1. Offline

    slayr288

    Well, all of the shutdown plugins are either overly complicated or outdated/unsupported.

    I just want a simple plugin that with similar config options as the following:
    Code:
    warnmessage: '&7Server is shutting down, you can edit this'
     
    #Use HH:MM Format, 24-hour clock
    Times:
      - 11:00
      - 18:30
    1 minute before a scheduled shutdown, the warnmessage would be sent to all of the players on the server. (Preferably with color support)

    In the following example, the server would shutdown on the times of 11:00 AM and 6:30 PM of the server's local time.

    With a automated start on shutdown script, this plugin can turn into a powerful restart tool for a server, setting the restart time to the time of day with the least amount of activity.
     
  2. Offline

    UltiFix

    yea but you will need a modifed start.bat
    heres one for you if you need it. this will have i think a five second delay time before it starts up.....

    Echo OFF
    SET BINDIR=%~dp0
    CD /D "%BINDIR%"
    :start
    ECHO Loading
    PING 1.1.1.1 -n 1 -w 5000 > NUL
    "%ProgramFiles%\Java\jre7\bin\java.exe" -Xincgc -Xmx4G -jar craftbukkit.jar
    goto start
    PAUSE
     
  3. Offline

    slayr288

    Thanks for the script, but I'm pretty sure that's only for Windows.

    ---

    A script for Linux would be more efficient with a screen session and timer to cancel the restart, as following:

    start.sh
    Code:
    #!/bin/sh
    screen -S "Minecraft" bash -c "sh /home/Server/loop.sh"

    loop.sh
    Code:
    #!/bin/sh
    while true
    do
            java -Xincgc -Xmx3500M -XX:+DisableExplicitGC -XX:MaxGCPauseMillis=50 -jar craftbukkit.jar nogui
            echo "Cancel the restart with CTRL+C"
            echo "Rebooting in:"
            for i in 5 4 3 2 1
            do
                    echo "$i..."
                    sleep 1
            done
            echo "Restarting."
    done
    Remember to change parts of the scripts to fit your needs, as in the location of 'loop.sh' in the 'start.sh' line, and the java options in the 'loop.sh' script.
     
  4. Offline

    slayr288

    Can anyone help me out here?
    I'd really appreciate it.
     

Share This Page