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
Have your plugin became even more stable that it was? :) Thanks for the update mate, using it for ages now.
@vanderfr
it was built with the current development release of 1.4.2 with java 1.7. I dont know if it will work with anything else at all. You need to provide more information than a backtrace.
This is what I get;
2.4 give me this at start up :
http://pastebin.com/qYTudi9T
CB#2432
I've done a build for 1.4.2. Let me know if I need to release a 1.3.2 version.
can you update this plugin!
Thanks to fireant456, we now have a version of this mod that works with newer versions of CraftBukkit!!! Thanks. I used to use this and moved to the relative shutdown mod in the Monkey Pack but now that this is working for CB 1.3.1, I will be switching back.
EDIT #1: I wish fireant456 allowed comments. The config file only recognizes times encapsulated in single quotes if there is only a single entry. I know this because I set the shutdown time to just 3:00 and then typed "as list" at the console and showed no shutdown times. Typing "as set 3:00" set the time and after I stopped the server and looked at the config file, it showed shutdowntimes: '3:00'
Also, it still shows "Autoshutdown 2.2" when loading in the console rather than 2.3 (minor issue). This can be corrected by anyone by editing the "plugin.yml" file inside the jar and changing the version from 2.2 to 2.3.
EDIT #2: fireant456's version does not work with all java versions. I was using Java 1.6.0_31 on an Ubuntu Server and had to upgrade which proved to work when updated to Java 1.7.0_06. No other plugins I have or craftbukkit itself had a problem with Java 1.6 but once I upgraded, I also don't see Java 1.7 "causing" any issues with CB or the other plugins I use.
EDIT #3: If you are running on a Linux server, you can use bash scripts to accomplish the same thing without the need for this plugin. For an example, take a look at my "cb-reboot.sh" script on my forum thread.
LHammonds
@samsunix
http://dev.bukkit.org/server-mods/auto-shutdown/pages/main/
Please update these for Mc 1.3.1
@drdeft
I would say that this is a bukkit bug than, IIRC without looking at the code again it does only triggers a shutdown. The only difference between the plugin and a normal shutdown is that people know beforehand.
for those who still need this TheMonkeyPack has an AutoStopServer module which will shutdown your server, but not at a specific time though
@drdeft
I have a suggestion for an easy fix:
1. save-all 2. kick-all 3. save-all 4. shut her down
Players can dupe items with this plugin!
They take items from chest on last second before shutdown. After restart there are two items: 1 in the hand and 1 in the chest.
Any ideas how to fix???
Or alternative plugin without this issue.
This modified version work for me on 1.2.5 : http://team-frenchie.com/web/up/AutoShutdown_V_2.2.jar
This probably won't work for 1.2 because it is designed for an old version of CraftBukkit. This would be great if it was updated to 1.2.5
if you don't know what you are doing then this WILL screw up your server
players can dupe items with this plugin
@hanswalter123
I just installed this for the first time and it didnt generate the config file.
@hanswalter123
Sorry, catch me if I'm wrong, but I don't think this is working with 1.2.5. I tried it on my server and it won't generate the config file.
@JohnPulse
works with 1.2.5
Hello, can it please be updated to 1.2.5 RB?
Regards, John
I have this installed on a CraftBukkit 1.2.4 server (Ubuntu 10.04 with Java 6) and the main function of cleanly shutting down the server at designated times works great...however, I am not getting any warning messages. I did see one warning message a split second before losing connection because of the shutdown but that is it. It says AutoShutdown v2.2 but I think it is really the version that inorixu uploaded below on March 8th, 2012.
Anyone getting notification messages?
Here is my config file but it seems to be a code issues rather than a config issue.