[ADMN] AutoStop v0.53 - Auto Stop & Restart Your Server [650-803]

Discussion in 'Inactive/Unsupported Plugins' started by jasonznack, May 14, 2011.

  1. Offline

    Phaedrus

    Server AutoStop
    Time-Based Scheduled Server Shutdowns and Restarts

    (Maintenance Release Edition)

    NOTE: May not be working properly in CraftBukkit RB 928 with Permissions 3.


    Credit: AutoStop is a plugin originally written by @dv90 and last updated by @Afforess.
    ALL CREDIT GOES TO THEM. I have done nothing, other than make the plugin visible again.

    The Following Is Modified From the Original Thread:

    I. Requirements: Permissions 2.7+ (Optional)

    II. Description: A simple plugin that saves player and chunk data then shuts the server down at a specified time. Great for clearing memory leaks and updating plugins automatically.

    III. Features:
    • Works with Windows AND Linux AND Mac
    • Saves Player Data and Chunk Data before stopping the server
    • Gives a custom warning at specified time before shutting down
    • Quickly shuts server down
    • Uses autostop.properties to specify what time (24-hour clock) it should shutdown
    • Automatically creates the properties file if it doesn't exist
    • Automatically restarts server (if you enable it)
    • Multiple restart times possible
    IV. Installation:

    1. Download the AutoStop.jar listed below and put it in your plugins folder.
    2. Start and Stop the server once to create the Server AutoStop folder and config file.
    3. Edit the config file to suit your needs. See the example below.
    V. Special Notes:

    • The plugin will automatically put AutoRestart.jar in your bukkit directory.
      • Don't run it; it won't do anything.
      • Do not delete or move it.
    • If your server doesn't auto restart, post your restart_log.txt here.
      • If there is no restart_log.txt, you're doing it wrong.
    • If you use a .bat file (server_nogui.bat), set your path to: path=start server_nogui.bat
    • ANYBODY USING AN EXTERNAL SERVER (Such as a VPS):
      • Remember, your server's timezone may be different. Take that into account when setting up your autostop.properties.
    VI. Commands:

    • /reboot - Immediately saves data and restarts the server.
    • /restart - Same as reboot.
    VII. Permissions:

    • Node: autostop.use
    • Don't use the Permissions Plugin? Just OP yourself.
    IIX. Properties File Example:

    Note: It appears there are duplicate properties files created. One in /plugins/AutoStop/and another in /plugins/ServerAutoStop/. Be sure to set your parameters in BOTH FILES.

    Code:
    stoptime=12:00:00 12:05:00 12:10:00
    # Use 24-hour time. Separate times with a space. [Hour:Minute:Second]
    warntime=0:10 0:30 1:00 5:00 15:00
    # Displays warning this many min:sec before shutting down. Separate with space. [Minutes:Seconds]
    warnmsg=Shutting down...
    # Warning message to display.
    enablerestart=true
    # Enables automatic server restarts. If this is true, path must not be blank.
    path=java -jar craftbukkit.jar
    # Path to server file (including any arguments). This can also be a command if you are using crontab/screen/etc.
    # Linux screen example:
    # path=screen -dmS MinecraftServer java -jar craftbukkit.jar
    
    IX. Current Release:
    X. Trouble Shooting:
    • Please read this thread before posting. Several tips have been posted that might solve your problem.
    • Also see the old thread first before posting your issues. It's a short thread, so no excuses for not reading first.
    • Original Thread: http://forums.bukkit.org/threads/7425/
    XI. Known Issues:
    • It appears there are duplicate properties files created. One in /plugins/AutoStop/ and another in /plugins/ServerAutoStop/. Be sure to set your parameters in BOTH FILES.
    XII. Change Log:
    • Version 0.53
      • Fixed a few small bugs
      • Kicks all players before shutting down
      • Updated to latest RB
    • Version 0.52
      • Supports multiple warn times now
      • Other small fixes
    Older Change Log (open)


    Version 0.51
    • Fixed a small problem with the syntax of the auto-generated autostop.properties file.
    Version 0.5

    • Multiple stop/restart times
    • Added better support for Windows cmd users
    Version 0.4

    • /reboot and /restart commands
    • Permissions support for commands
    Version 0.3

    • Automatic server restarts
    • Stop/Warn time precision works with seconds now
    Version 0.2

    • Added configurable warning message and warning time
    • Attempted automatic restarts but had no luck; possible in a future release
    Version 0.1

    • Initial Release



    Credit: AutoStop is a plugin originally written by @dv90 and last updated by @Afforess.
    ALL CREDIT GOES TO THEM. I have done nothing, other than make the plugin visible again.
     
  2. Offline

    Jakeob22

    Thats my file... I know I got the path wrong but I don't know how to fix it. I feel stupid. Help?
     
  3. Offline

    Phaedrus

    try path=start run.bat
     
  4. Offline

    Black_Jack

    May be try to put your path in quotes(yeah, there are a spaces, this is NOT very nice). Also try to remove spaces in names.

    BTW
    My server didnt restart. When i say /reboot, my server ONLY shutting down. Also, restart_log.txt didnt created, but Autostop.jar appeared in the root. Here is my config. Any solutions?

     
  5. Offline

    Phaedrus

    Try putting your command line into a .sh file and calling that instead of the complete line. I've had better luck with that.

    Here is my start bat file and properties file for an example. Works flawlessly in windows 2008 r2

     
  6. Offline

    dv90

    @Phaedrus, thanks so much for keeping this alive. I'm surprised anybody still cares about it :p
     
  7. Offline

    Phaedrus

    It's my pleasure. It's very handy. The memory leaks can get pretty bad. And being able to easily update plugins on a restart makes it great too.
     
  8. Offline

    Aeron

    Strange, that I never saw this pluugin in the forums, because I check them quite often, and will definetly try this, because I am also experiencing huge memory leaks after the server has been online a couple of days, so a 1 auto reboot each 24 hours would be nice - also would kick out all inactive players.
     
  9. Offline

    dv90

    Yeah, I just wish I had the time to help people out with it. In a month or so I might update it again and maybe make it a little easier. Though, it's hard for me to find time to work on stuff like this right now.
     
  10. Offline

    Phaedrus

    Even just a bug fix release would be nice. It's pretty much feature complete if you ask me.
     
  11. Offline

    dv90

    Well if you make a list of all the bugs or something like, that, I think I could get that done.
     
  12. Offline

    fregaPT I steal plugins as my own

    Very useful!
    I will add this plugin to one of my favourite plugins and I might include it in a plugin that I am developing. (Kind of a Essentials plugin)
    Do you mind if I use the part source ? (I will add a thank-you note and some stuff featuring you).
    Thank you,
    fregaPT
     
  13. Offline

    dv90

    Sure why not :p
     
  14. Offline

    ScottCameron

    Hey,

    When I use the plugin it never works for me regardless of what Operating System I use.
    It says "Restarting Server...." then "Shutting down server..." then "/restart".
     
  15. Offline

    Phaedrus

    You're going to have to post more information if you want help.
     
  16. Offline

    ScottCameron

    Well like what? - It doesn't create the .txt, so I can't post there. The plugin loads perfectly fine, no errors.

    [​IMG]
     
  17. Offline

    Phaedrus

    What OS?
    What Java version?
    What Bukkit version?
    Can you post the contents of your start bat or sh file?
    Can you post your AutoStop.properties files?
    Have you configured both properties files? One in /plugins/AutoStop/and another in/plugins/ServerAutoStop/. Be sure to set your parameters in BOTH FILES.

    The biggest one I've noticed is that the plugin seems to create two folders in /plugins/ for the properties files.
    One in /plugins/AutoStop/and another in/plugins/ServerAutoStop/. It seems like you have to configure both of them.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  18. Offline

    Deren909

    Does this work with Mac?
     
  19. Offline

    Phaedrus

    It should.
     
  20. Offline

    Rufus

    I have a small problem my warning message never displays before restarting for a scheduled restart. Any idea why? Everything restarts fine and I don’t get any error messages in the console... I'm using 766.

    Great/simple plugin by the way.
     
  21. Offline

    Phaedrus

    Post the contents of your properties file.
    Also, there is a bit of a bug. There are two places where a config file may show up. One in /plugins/AutoStop/ and another in/plugins/ServerAutoStop/. Be sure to set your parameters in BOTH FILES.
     
  22. Offline

    Rufus

    Code:
    stoptime=00:00:00 03:00:00 06:00:00 09:00:00 12:00:00 15:00:00 18:00:00 21:00:00
    # Use 24-hour time. Separate times with a space. [Hour:Minute:Second]
    warntime=1:30
    # How many seconds before shutdown/restart to show warning. Separate times with a space.[Seconds]
    warnmsg=Restarting server to maintain performace...
    # Warning message to display.
    enablerestart=true
    # Enables automatic server restarts. If this is true, path must not be blank.
    path=java -Xmx2048M -Xms2048M -jar minecraft_server.jar nogui
    # Path to server file (including any arguments). This can also be a command if you are using crontab/screen/etc.
    Also is there any way to make a delay defore the server starts up again? Sometimes the server doesn't finish unloading the plugins before it boots up again.

    Thanks,

    Rufus
     
  23. Offline

    nskjunky

    I cannot restart the server. If I type /reboot into the chat, it just stops the server.

    Edit 1:
    The reboot funktion works, but the automatic restart function doesn't work. It just stops the server.
     
  24. Offline

    Phaedrus

    1. Have you set the properties file in both /plugins/serverautostop/ and /plugins/autostop/ ?
    2. I have a delay in my startup batch file using sleep.exe You can call it in a batch file to wait for a specified number of seconds before going on to the next command. See my example bat below.
    Code:
    @ECHO OFF
    ECHO Waiting 15 seconds to start server...
    SLEEP 15
    TITLE MINECRAFT-CRAFTBUKKIT
    START "MINECRAFT-CRAFTBUKKIT" /ABOVENORMAL /B "C:\Program Files\Java\jre6\bin\java.exe" -Xms1G -Xmx3G -jar craftbukkit.jar
    EXIT
    You could also use ping to add in a delay.
    Code:
    ping -n 20 www.google.com
    That will ping google twenty times, and takes about 10 seconds.

    So using that my path line would look like this
    Code:
    path=StartServer.cmd
    1. Have you set the properties file in both /plugins/serverautostop/ and /plugins/autostop/ ?
    2. Post the contents of your properties files and your startup batch file

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  25. Offline

    Rufus

    I have set properties file in both /plugins/serverautostop/ and /plugins/autostop/ yet it still doesn't seem to display the warning...

    My other problem, about the delaying the restart is fixed but I am still not getting any warning messages. Any ideas why?
     
  26. Offline

    Phaedrus

    Try changing your warn time to 00:01:30
     
  27. Offline

    Rufus

    I've done that and still nothing. <_<

    My players keep thinking the server is crashing even tho I tell them its an automated restart.
     
  28. Offline

    Phaedrus

    Try changing it to 10 to 15 minutes. maybe the timer is really off.

    Also, can you change the restart time to a time when there are fewer users online?
     
  29. Offline

    Rufus

    It doesn't seem like its working propperly for me for some reasion because I'm still not getting the warning show up. I forgot to mention this but when the server restarts people dont get the cut-to-error message screen with the "Server is shutting down" message and the back to title screen button but sort of just stay in the server and time out getting this sort of error message like the one below. what is odd is that on the server the cmd has been restarted and there is no errors in the console of the cmd that shutdown. Its just weird... do you get a warning on your server then?

    [​IMG]
     
  30. Offline

    Phaedrus

    I suggest deleting the plugin, the plugin folders, and the autorestart.jar file and redownloading from scratch.
     
  31. Offline

    MacG32

    I want to make sure I get this setup correctly. I'm using screen in Linux and I start it using screen -S ms, then type sh ms.sh to run CB. What would my path equal to for restarting? The example is: path=screen -dmS MinecraftServer java -jar craftbukkit.jar I've tried: path=screen -dmS ms sh ms.sh , but obviously I'm missing something. The ms screen is always running and I detach from it using Ctrl a + d. I've looked through all of the screen options, but can't figure this out for some reason.
     

Share This Page