Skip to main content
The Maintenance plugin includes a powerful timer system that can automatically enable or disable maintenance mode after a specified duration, with automatic broadcasts to warn players.

Timer Commands

Start Timer

Schedule maintenance mode to be enabled after a specific duration:
# Enable maintenance in 30 minutes
/maintenance starttimer 30m

# Enable maintenance in 2 hours
/maintenance starttimer 2h

# Enable maintenance in 90 seconds
/maintenance starttimer 90s

# Enable maintenance in 2 hours and 30 minutes
/maintenance starttimer 2h30m

End Timer

Schedule maintenance mode to be disabled after a specific duration:
# Disable maintenance in 1 hour
/maintenance endtimer 1h

# Disable maintenance in 45 minutes
/maintenance endtimer 45m

# Disable maintenance in 30 seconds
/maintenance endtimer 30s

Abort Timer

Cancel a currently running timer:
# Cancel any active timer
/maintenance aborttimer

Schedule Timer

Combine start and end timers into a scheduled maintenance window:
# Enable maintenance in 1 hour, then disable it 30 minutes later
/maintenance scheduletimer 1h 30m

# Enable maintenance in 30 minutes, then disable it 2 hours later
/maintenance scheduletimer 30m 2h
The schedule command takes two durations: the first is when to enable maintenance, and the second is how long maintenance should last.

Duration Formats

The plugin supports flexible duration formats using hours (h), minutes (m), and seconds (s):

Single Units

/maintenance endtimer 30      # 30 minutes (default when only a number)
/maintenance endtimer 30m     # 30 minutes (explicit)
/maintenance endtimer 2h      # 2 hours
/maintenance endtimer 90s     # 90 seconds

Combined Units

/maintenance endtimer 2h30m   # 2 hours and 30 minutes
/maintenance endtimer 1h45m   # 1 hour and 45 minutes
/maintenance endtimer 90m30s  # 90 minutes and 30 seconds

ISO 8601 Duration Format

The plugin also accepts standard ISO 8601 duration strings:
/maintenance endtimer PT2H30M    # 2 hours and 30 minutes
/maintenance endtimer PT1H       # 1 hour
/maintenance endtimer PT30M      # 30 minutes
Timers have a maximum duration to prevent extremely long tasks. Attempting to set a timer beyond this limit will result in an error.

Broadcast Intervals

When a timer is running, the plugin automatically broadcasts warnings to players at configured intervals. Configure these intervals in config.yml:
# If using the timer command: In what intervalls before enabling/disabling maintenance there will be a broadcast.
timer-broadcast-for-seconds: [1200, 900, 600, 300, 120, 60, 30, 20, 10, 5, 4, 3, 2, 1]
Default broadcast intervals:
  • 20 minutes (1200s)
  • 15 minutes (900s)
  • 10 minutes (600s)
  • 5 minutes (300s)
  • 2 minutes (120s)
  • 1 minute (60s)
  • 30 seconds
  • 20 seconds
  • 10, 5, 4, 3, 2, 1 seconds

Customizing Broadcast Intervals

You can customize when broadcasts occur:
# Broadcast only at major intervals
timer-broadcast-for-seconds: [3600, 1800, 600, 300, 60, 30, 10, 5, 1]

# Broadcast more frequently near the end
timer-broadcast-for-seconds: [600, 300, 120, 60, 45, 30, 15, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]

# Simple intervals every 5 minutes
timer-broadcast-for-seconds: [1500, 1200, 900, 600, 300, 60, 30, 10]
Broadcast intervals are specified in seconds. To add a 25-minute warning, use 1500 (25 × 60 = 1500).

Timer Persistence

Timers can persist across server restarts, so if your server crashes or restarts while a timer is running, it will continue when the server comes back online.

Configuration

# If enabled and the server is restarted while running an endtimer, the timer will be continued after the restart.
# If the timer ends while the server is offline, maintenance will be disabled as soon as the server starts again.
continue-endtimer-after-restart:
  enabled: false
  # This value is set everytime an endtimer is started, cancelled or ended.
  # Do not manually change this value.
  end: 0
1

Enable timer persistence

Set enabled: true under continue-endtimer-after-restart in config.yml.
2

Start a timer

Run /maintenance endtimer 2h or any timer command.
3

Restart the server

The plugin saves the timer’s end time to the config automatically.
4

Timer resumes after restart

When the server starts, the plugin checks if the timer has finished and resumes or completes it accordingly.

How It Works

  1. Timer starts: The end timestamp is saved to config.yml
  2. Server restarts: The plugin reads the saved timestamp
  3. Time remaining calculated: If time remains, the timer continues
  4. Timer expired offline: If the timer ended during downtime, maintenance is toggled immediately
  5. Timer completes: The saved timestamp is reset to 0
Only endtimers (timers that disable maintenance) are persisted. Start timers and schedule timers are not saved across restarts to prevent unintended maintenance enabling during outages.

Proxy Mode Timers

On BungeeCord and Velocity, you can run timers for individual backend servers:
# Enable maintenance on 'survival' server in 1 hour
/maintenance starttimer survival 1h

# Disable maintenance on 'creative' server in 30 minutes
/maintenance endtimer creative 30m

# Schedule maintenance on 'minigames' server
/maintenance scheduletimer minigames 2h 1h

Timer Display

The %TIMER% placeholder shows the remaining time in a human-readable format:

In MOTD Messages

ping-message:
  enable-timer-specific-messages: true
  timer-messages:
    - "<red>Maintenance ends in: <yellow>%TIMER%"

In Broadcast Messages

Customize timer broadcast messages in your language file:
endtimerBroadcast: "<prefix><yellow>Maintenance will be disabled in <green>%TIME%<yellow>!"
starttimerBroadcast: "<prefix><yellow>Maintenance will be enabled in <red>%TIME%<yellow>!"

Use Cases

Scheduled Maintenance Window

# Announce maintenance starting in 2 hours, lasting 1 hour
/maintenance scheduletimer 2h 1h
This will:
  1. Broadcast warnings at configured intervals for 2 hours
  2. Enable maintenance automatically after 2 hours
  3. Broadcast countdown messages for 1 hour
  4. Disable maintenance automatically after 1 hour

Quick Restart Warning

# Warn players before a 5-minute restart
/maintenance starttimer 5m
# Then manually restart after timer ends

Temporary Maintenance

# Enable maintenance now for 30 minutes
/maintenance on
/maintenance endtimer 30m

Advance Notice

# Give players 1 hour notice before maintenance
/maintenance starttimer 1h

Permissions

PermissionDescription
maintenance.timerUse timer commands (starttimer, endtimer, aborttimer)
maintenance.singleserver.timerUse timer commands for individual servers (proxy mode)

Example Workflow

1

Announce scheduled maintenance

# Schedule maintenance to start in 1 hour and last 30 minutes
/maintenance scheduletimer 1h 30m
2

Automatic broadcasts begin

Players receive warnings at: 20m, 15m, 10m, 5m, 2m, 1m, 30s, etc.
3

Maintenance enables automatically

After 1 hour, maintenance mode activates and players are kicked (unless whitelisted).
4

Countdown broadcasts continue

During the 30-minute maintenance window, broadcasts show time remaining.
5

Maintenance disables automatically

After 30 minutes, maintenance mode ends and players can rejoin.

Build docs developers (and LLMs) love