OnTimeCommands
OnTimeCommands - Run sets of commands at different times of the day
Version: 1.5
Ever wanted to run certain server commands or messages at a certain time of day? If so, this is the plugin for you! OnTimeCommands lets you set up tasks that run at a set time of day. Each task can have an unlimited number of commands to run at the set time.
Features:
- Set up different tasks, each with their own time of day
- Control how often the task repeats by specifying the hours, minutes, seconds, months, days, and years between runs
- Each task can have as many commands as you want from any plugin installed on the server
- Time of day is configurable down to the second and runs every day
- Use to, for example, save and reboot the server for a system reboot so the map doesn't get corrupted.
- Run tasks on demand or enable/disable the plugin in-game
Configuration Example: I have a server computer that restarts every day at 11:00 PM to "reset" everything. The server starts as soon as the computer finishes restarting, but it never gets a chance to save when the computer shuts down. OnTimeCommands can solve this problem. Here is an example configuration file (/plugins/OnTimeCommands/config.yml):
config.yml:
//this is to fix the code tag. please remove this line when pasting. enabled: true tasks: warnshutdown: nextrun: '22:59:50 7-05-2011' repeat: day repeatspan: 1 commands: - 'say The server will restart in 10 seconds. All work will be saved.' - 'save-all' shutdown: nextrun: '23:00:00 7-05-2011' repeat: day repeatspan: 1 commands: - 'stop'
This will warn all users that the server will restart soon. It saves the work, just in case it doesn't have time to issue the "stop" command before being shut down. Then exactly at 11:00PM, the "stop" command is issued and the server is shut down properly before the computer restarts.
Configuration:
The configuration file is /plugins/OnTimeCommands/config.yml
the "enabled:" tag just tells if the tasks should be run or not. Helpful if you want to disable the plugin without deleting it.
in "tasks:", you can define different tasks with unique names. each task should have a "date:" tag with a time format of "HH:mm:ss MM-dd-yyyy", using 24-hour time (0-23 hours). You also have the option to put a "repeat:" tag with a value of "year", "month", "day", "hour", "minute", or "second", and a "repeatspan:" tag specifying how many of the "repeat" unit should go by in between runs. If you do not specify these options, the task will default to running every day. Note that the "repeat" values are singular. If you make them plural, it will crash the plugin with an "IllegalArgumentException", so if you get one of these when you start your server, check your configuration. Each task should also have a "commands:" tag with a list of server commands as run through the console (no "/"). See the example above for more detail. Note that if you have the server shut down during the time that a task is supposed to run, you need to update the time that the task should run next or it will reset to the day you start the server back up again, and will not retain the time. If you need help with an error, please post the part of your server log that contains the error AND your entire "config.yml" file.
Commands:
/otcenable - Enables the plugin Permissions: ontimecommands.enable /otcdisable - Disables the plugin Permissions: ontimecommands.disable /otcreload - Reloads the plugin configuration (without saving it) Permissions: ontimecommands.reload /runtask <taskname> - Runs the task with the specified name (does not advance nextrun date; works when plugin is disabled) Permissions: ontimecommands.run.[taskname]
Please post any bugs/glitches you find or any questions you have.
Changelog:
Version 1.5
- Plugin now works with Bukkit 1337.
- Console messages from the plugin are now sent to OPs as well.
- In next version:
There will also be a permissions node for players to receive OnTimeCommands messages.Please see poll at top right of page.
- In next version: Plugin will use the default Bukkit permissions system so any permissions plugin can be used.
Version 1.4:
- Fixed bug where plugin would not be able to compute correct run time if a run was missed
Version 1.3:
- Added support for Permissions
- Added a reload command (/otcreload) to reload the configuration without shutting down the server
- Changed the "repeat" option so that it is easier to set up and less buggy
- Misc. bug fixes, including the issue with Bukkit 1060
Version 1.2:
- Added commands to enable/disable plugin in-game
- Added command to run a task on demand
- Fixed bug causing nextrun date to advance too far
- Plugin now attempts to calculate the correct nextrun date when a run is missed (instead of resetting to server startup time)
Version 1.1:
- Added more options for configuring task repetition
- Fixed file path error on Linux and Mac OS
Version 1.0:
- Initial plugin release
@UbuntuFreak
oh sorry i did find it, meant to tell you, thanks man :)
@EmpiricalDepth
Oh sorry, the correct link is:
http://dev.bukkit.org/server-mods/consolescheduler/
@UbuntuFreak
crazy announcer looks good but requires yet another plugin, I was going for light weight, but ill prolly cave n try it anyway. the console scheduler link isn't working, also spelled quite wrong, i'll just look it up thanks :)
@EmpiricalDepth
As nicquehen one command ago said, you can use this: CrazyAnnouncer or ConsoleSchueduler what's a bit outdated but it still works fine.
this sounds great, has anyone done something similar? or plan to bring this back to life?.. the previous poster's suggestion looks good but much more than I need.
I move to crazy annoucer.
http://dev.bukkit.org/server-mods/crazyannouncer/
The plugin don't work (with the last recommend bukit build) :(
Please update
2012-06-20 05:00:02 [SEVERE] Error occurred while disabling OnTimeCommands v1.3 (Is it up to date?) java.lang.NoClassDefFoundError: org/bukkit/util/config/Configuration at briman0094.ontimecommands.OnTimeCommands.onDisable(OnTimeCommands.java:106) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:363) at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:400) at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:393) at org.bukkit.craftbukkit.CraftServer.disablePlugins(CraftServer.java:251) at net.minecraft.server.MinecraftServer.stop(MinecraftServer.java:409) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:489) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
Update this plugin, darn it.
I remember using this on cb 1337 and loved this plugin! I can't wait for 1.2.5 update.
Sorry, guys, for the delayed release. I have been very busy with school and other obligations and haven't been able to work on the plugin much. I'll try to update it in a week or so.
I'd really like to see this updated to 1.2.5. I need a plugin that does just what this one does.
when will this plugin updated again? I need it , its the best plugin what i never see ;D
@ArcanoxDragon I did it, hopefully it helps you...
@nicquehen
To help me get the update out faster, can you tell me exactly what the problem is? Please post it in a ticket.
@ArcanoxDragon
Need an update too :) i switch my server to 1.2 no work since :p
Quickly replaying :D Nice to hear this, thanks :)
I'll be working on an update soon, but it might take a while because I also have two client mods to update. I'll try to get it out ASAP.
Thank you for this amazing plugin. Badly it doesn´t work since 1.1. Can you please update it for the latest version of Bukkit? It would really help me managing our server. Thanks for your hard work and good luck.
This isn't working with the dev build of bukkit I'm running with 1.1. Seems to be somethig with loading the tasks because runtask doesn't function. I'm guessing the whole thing is likely a bukkit bug, but fyi.
@king_nothing_
What specifically doesn't work on 1.0.1-R1? I need to know what part to fix for the new RB.