AutoShutdown
AutoShutdown: Automatically Shutdown/Stop your server at a set time every day.
Version: v2.4
This plugin is designed to allow you to simply set a time to have the server shut down at the same time every day, without any manual intervention, and provide users ample warning before it does so.
You should use a script to automatically restart the server when it stops. In that script, you could perform any backups or other maintenance you'd like to perform.
I use this plugin to keep a server healthy for longer than a few days by pre-emptively restarting it before it can get sick.
Example restart script in the forum thread.
Features:
- Time can be set persistently in the configuration file.
- Multiple times can be specified.
- Shutdown time can be set temporarily via commands
- You can cancel the running shutdown.
- You can view the current scheduled shutdown time.
- You can gracefully stop the server with a configurable grace time.
- The warning message times are configurable.
- All connected users can be kicked from the server before the shutdown.
Download AutoShutdown 2.4 JAR (for 1.4.2 craftbukkit prerelease)
Source Code
Requirements:
- SuperPerms compatible permissions plugin. Currently won't limit access to commands without some kind of permissions support.
Installation
- Drop the AutoShutdown.jar file into your plugins directory. At first start, the configuration file is created.
- Edit the config.yml file created in plugins/AutoShutdown/ and change the settings to what you would prefer.
- Either reload the server for the changes to take effect, or use /as reload from within the game. Also, all commands work from the console without the slash.
Upgrading
From all previous versions to 2.2: AutoShutdown.properties file is no longer read. Use the config.yml. I'm not a fan of YAML, but its the standard, and as much as I disagree with bukkit's choice of YAML for configuration files, I have to live with it.
An uncommented config.yml file will be created on first start. Start the server, make changes, then do an /as reload. Or just use /as set HH:MM to set the shutdown times you want.
Configuration Options
- shutdowntimes - the time in HH:MM format to stop the server. You can specify multiple, times, separated by comma.
- kickreason - the reason to provide users when they are kicked.
- kickonshutdown - kick users before shutting the server down. (Better than an end of stream error)
- warntimes - seconds before the shutdown time you would like a warning message broadcast to all users, separated by comma.
- gracetime - seconds to wait before shutting the server down in response to an /as now
Permissions Nodes
- autoshutdown.admin - Access to all autoshutdown commands.
Commands
- /as help - displays in-game help
- /as reload - reload the configuration file (replacing any shutdown you have scheduled currently in memory)
- /as cancel - cancel the currently scheduled shutdown
- /as set HH:MM - set the schedule to a new time. Writes to config.yml to persist the setting.
- /as set now - set the shutdown schedule to shut down within 60 seconds
- /as list - lists what the currently configured shutdown times are
Hi :) Thx for this great plugin! But after the last Bukkit-Update to DevBuild #1476 I got an error:
Any solution for this? I think I have set the correct rights for accessing the jar. Before updating my server, the plugin runs like a charm :P
Regards
This plugin is a jerk ;)
minecraft.net has auth problems atm and when the server said it will restart in a minute, I paniced - it took me 20mins to get on.
so i try /asd => fail, /autoshutdown => yes ... now fast: /autoshutdown cancel => shutdown aborted.
Hell yeah!!! We made it! That was close...
I get no more messages.. no counting down the last seconds etc...
Then: Server restarts. FUUUUUUUUUUUU !!!
Anyway.. wanted to let you know cancel doesn't work right - on scheduled restarts at least :)
Have no permission to use this as a OP or Owner seems this question was asked before but no answer has been given into why. Will be uninstalling and using RemoteToolkit since the support is lacking on this plugin
Configurable messages are indeed my greatest wish on this plugin.
And since the CB 1317 the autokick is disabled as well. people don't get the configurable message upon the shutdown... Thinking the server has actually shut down and not coming back.
Configurable messages please - Also option to remove the "[AutoShutdown]" - Maybe just put it in the configured default message, so one can remove it.
"Server is shutting down" is misleading if this is used for a restart.
Could you tell me some reasons it says I have no permissions? I am OP, I have '*' and permissions: - autoshutdown.admin I'm using PEX. Suggestions?
I have very limited access to an actual server that I would like to put a Minecraft server on, and so other than my initial installing of the server and this plugin I will have to rely on this plugin for restarting my Minecraft server. Could I update my Minecraft jar when needed during one of these restarts and would I never for any reason need to manually turn on the Minecraft server?
How long do these restarts last? Is it just where it turns off and then instantly turns back on? If not, what would happen if I kicked everyone about 15 minutes before it restarts, then before those 15 minutes I swapped out the jar files and whatnot while it was still running?
is it posiable to use another command than /as, another plugin is already using that at my server
How do i set a restart time every day? Not shutdown, but restart.
@telephonekiosk
It performs a player save and unloads all worlds and saves and then uses bukkit's shutdown command, which also does a save.
It doesn't save it's own configuration yet, if that's what you're asking. Editing the shutdown times is coming in the next major release.
Does it save prior to restart?
Hi, i think i will try this plugin. But where is the restart script? :-)