Getting started with TimedRestore couldn't be easier. Just download and drag it into your plugins folder and away you go. Still stuck? Read on.

Scheduling tasks

Restoring regions is a time consuming operation and will lock your server while they are ongoing. You may want to consider this in your scheduling when restoring multiple large regions.

Scheduling tasks in TimedRestore is very flexible and best explained through examples. Internally TimedRestore uses the cron4j library to simulate a unix cron like syntax for scheduling tasks. It is broken into 5 values and seperated by spaces:

Minutes sub-pattern
During which minutes of the hour should the task been launched? The values range is from 0 to 59.
Hours sub-pattern
During which hours of the day should the task been launched? The values range is from 0 to 23.
Days of month sub-pattern.
During which days of the month should the task been launched? The values range is from 1 to 31. The special value "L" can be used to recognize the last day of month.
Months sub-pattern.
During which months of the year should the task been launched? The values range is from 1 (January) to 12 (December), otherwise this sub-pattern allows the aliases "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov" and "dec".
Days of week sub-pattern
During which days of the week should the task been launched? The values range is from 0 (Sunday) to 6 (Saturday), otherwise this sub-pattern allows the aliases "sun", "mon", "tue", "wed", "thu", "fri" and "sat".

Full documentation is available in the cron4j manual.

Example schedules

0 */1 * * *
To be scheduled once every hour, at the start of the hour.
* * * * *
To be scheduled every minute.
*/5 * * * *
To be scheduled every 5 minutes
0 0 */7 * *
To be scheduled once a week on the first day at midnight.
0 7 L * *
To be scheduled on the last day of each month at 7AM.

Configuring tasks

For this example I am going to simple create a task which is going to restore a single region. I’ve already taken a snapshot of the world called original which I am going to use to restore the region. The region I am going to restore is called spawn and I want to do it once every day. My tasks.yml is going to end up looking like this:

tutorial:
  schedule: "0 0 */1 * *"
  world: world
  snapshot: "original"
  regions:
    - spawn

You can configure as many regions as you like to restore within one task. TimedRestore will restore the regions in the order that you specify. They will all be restored using the same snapshot.

Permissions

timedrestore
Allow access to everything in the plugin (defaults op)
timedrestore.reload
Allow a player to reload the plugin's configuration (defaults op)
timedrestore.scheduler
Allow a player to enable or disable scheduled tasks (defaults op)
timedrestore.status
Allow a player to check the status of the scheduler (defaults op)