Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Chrono — Task Scheduler Plugin

A Paper plugin for scheduling commands to run on a timer or cron schedule.


Requirements

  • Java 21+
  • Paper 1.21.4+
  • Maven 3.8+ (to build)

Build

mvn package

Output: target/Chrono-1.0.0.jar
Copy it to your server's plugins/ folder.


Commands

/chrono add <schedule> <command> [name:X] [world:X]
/chrono list
/chrono info <id>
/chrono remove <id>
/chrono enable <id>
/chrono disable <id>
/chrono run <id>
/chrono edit <id> <field> <value>
/chrono logs <id> [limit]
/chrono gui
/chrono export [filename]
/chrono import <filename>
/chrono reload

Edit fields: name, command, schedule, world


Examples

# Announce the server restart in 1 hour
/chrono add 1h broadcast &eServer restart in 1 hour name:RestartWarn

# Save the world every 10 minutes
/chrono add */10 * * * * save-all name:AutoSave

# Clear lag once at a set time
/chrono add once:2025-07-01T03:00 lagg clear name:ScheduledLagg

# Run only in the nether
/chrono add 5m broadcast &4Nether is dangerous! name:NetherWarn world:world_nether

# Manual test run
/chrono run a1b2c3d4

# Disable without deleting
/chrono disable a1b2c3d4

# Export all tasks
/chrono export backup.yml

# Import from file
/chrono import backup.yml

Permissions

Node Description Default
chrono.admin Full access op
chrono.add Add tasks op
chrono.remove Remove tasks op
chrono.edit Edit tasks op
chrono.enable Enable tasks op
chrono.disable Disable tasks op
chrono.run Manually run tasks op
chrono.list List/view tasks op
chrono.reload Reload plugin op
chrono.gui Open GUI op
chrono.export Export tasks op
chrono.import Import tasks op

Config (plugins/Chrono/config.yml)

timezone: "UTC"          # Any valid Java ZoneId, e.g. "Europe/Berlin"

logging:
  enabled: true
  max-lines: 1000        # Max log entries stored in DB

gui:
  enabled: true
  rows: 6                # GUI rows (1-6)

messages:
  prefix: "&8[&6Chrono&8] &r"

Data

  • Tasks are stored in plugins/Chrono/chrono.db (SQLite)
  • Tasks survive restarts automatically
  • Export/import uses YAML in the plugins/Chrono/ folder

Architecture

dev.chrono/
├── ChronoPlugin.java          — Entry point
├── model/
│   ├── ChronoTask.java        — Task data model
│   └── TaskLog.java           — Log entry model
├── manager/
│   └── TaskManager.java       — CRUD, execution logic
├── scheduler/
│   └── ChronoScheduler.java   — 1-second tick loop
├── storage/
│   └── SQLiteStorage.java     — Persistence layer
├── command/
│   └── ChronoCommand.java     — All subcommands + tab completion
├── gui/
│   ├── TaskListGui.java       — Inventory GUI
│   └── GuiListener.java       — Click handler
├── permission/
│   └── Perms.java             — Permission constants
└── util/
    ├── Lang.java              — Messages + MiniMessage
    ├── ScheduleParser.java    — Cron/interval/once parser
    └── ImportExport.java      — YAML import/export

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages