This project is abandoned and its default file will likely not work with the most recent version of Minecraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.

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.


  • 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):


//this is to fix the code tag. please remove this line when pasting.

enabled: true

        nextrun: '22:59:50 7-05-2011'
        repeat: day
        repeatspan: 1
            - 'say The server will restart in 10 seconds. All work will be saved.'
            - 'save-all'
        nextrun: '23:00:00 7-05-2011'
        repeat: day
        repeatspan: 1
            - '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.


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.


/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.


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


Posts Quoted:
Clear All Quotes

About This Project



Recent Files