CronJobber
CronJobber
CronJobber allows you to schedule Console-Commands like "restart","say", etc...
If you upgrade from the old ChronJobber you may want to look into the Migration Info at the bottom.
For the future plans see the Planned Features - Section.
UPDATE 1.4
- Add cron version command to display current cronjobber version
- Switch create command parameter time and mode in Console-Command
- Give Player creation book on /cron create <timemode> Command
- Switch Serialization of Jobs to Json-Serialization for better management.
Currently you can create five types of Cron-Jobs:
Interval-based-, daily-, weekly-, monthly- and yearly-jobs
The Interval based jobs will be triggered either every 5,10,15, 20 ,25,30 or 60 Minutes.
All Intervals will be rounded up on startup:
Means 5 Minutes intervalls triggers at XX:05 , XX:10 , XX:15 and so on.
The daily jobs get triggered only once per day they have to be determined in 24 hours format, and are like the interval based, only placeable in 5 minute-intervals,
like 1:45 , 2:10 , 2:05 etc..
Weekly-Jobs will trigger once per week on the specified Day of Week like Monday , Tuesday ,...
Monthly-Jobs trigger every Month on a specific day for eg. at the 15. day of the month: it will trigger at 15th of January, 15th of February, 15 of March and so on.
Reminder: If you set the day to 31. the job will only trigger on months which have a 31st day.
And the Yearly-Jobs trigger once per year on a specific day, like birthdays.
So far so good.
Cron-UI
Create CronJob
Aside from the /cron create command, you can also create a Job per user interface.
To do so follow these steps:
- Open the ui with /cron gui
- Click on the star in the middle of the first row of the opened window.
- Click on the book which represents the Job you want to create.
- Open the book you were given.
- The content of the book represents the command which will be executed.
- The title of the book represents the execution time.
- As long as the book is not signed the command wont be created.
- You can use a book as often as you want, to get rid of it just drop it.
Edit CronJob
Aside from the /cron edit command, you can also edit a Job per user interface.
To do so follow these steps:
- Open the ui with /cron gui
- Click on the Job you want edit from the window
- Open the given book
- Change the command and close to apply the command change
- To change the title sign the book with the new execution time
- An edit book can be used as often as you want, to get rid of it just drop it.
Fast enable/disable CronJob
Aside from the /cron enable/disable command, you can also quickly disable/enable cronjobs per user interface
To do so follow these steps:
- Open the ui with /cron gui
- Right-Click on the Job you want to disable/enable.
- You will need cron.enable AND cron.disable permissions to use the rightlick functionality.
Examples
example for creating a cron job which will trigger 'say Hello World' at 4:15 am :
/cron create 4:15 clock say Hello World
example for creating a cron job which will trigger 'say Hello World' every 15 minutes:
/cron create 15 interval say Hello World
example for creating a cronjob which will trigger command "Happy new year!" on every new-years-day at 0:00 am
/cron create 1.01:00:00 year say Happy new year!
example for creating a cronjob which will trigger reload on begin of every month:
/cron create 1:00:00 month reload
example for creating a cronjob which will trigger reload on every Tuesday at 4:00 am :
/cron create Tuesday:04:00 week reload
Permissions
To gain access to the commands you need the following Permissions:
cron.help - Show Help Page
cron.create - Create Cronjobs
cron.create.interval - Permission to create interval-based cronjobs
cron.create.clock - Permission to create Daily cronjobs
cron.create.week - Permission to create Weekly cronjobs
cron.create.month - Permission to create Monthly cronjobs
cron.create.year - Permission to create Yearly cronjobs
cron.delete - Delete Cronjobs
cron.list - List Cronjobs
cron.edit - Edit a Job
cron.edit.ui - View Edit UI
cron.info - Display Job Infos
cron.enable - Enable a Job
cron.disable - Disable a Job
cron.trigger - Manually trigger a Job
cron.gui - Permission to open cron gui window
cron.enableCommandOnCreate - Permission to view enableCommandOnCreate config variable
cron.enableCommandOnCreate.set - Permission to set enableCommandOnCreate config variable
cron.disable.all - Permission to disable all cronjobs
cron.enable.all - Permission to enable all cronjobs
Planned features:
Version 1.5:
- Add tab completions for disable, enable, timemode and other keywords
- Add config value to toggle log output of command execution in console
- Add corrupted state to CronJob to prevent potential major problems with the execution time.
- Add possibilty to reload single jobs from cfg file
Version 1.6:
- Add possibilty to assign multiple commands to a single cron job
- Add possibilty to manually trigger commands from ui (shift leftclick)
- Add possibilty to delete commands from ui (shift rightclick)
Version 1.7:
- Add API to allow plugins hook into cron events (i.e create, trigger, delete)
Version independend todos:
- make code opensource
- make bukkit description more clear -got messi over time
Migrate from ChronJobber
Migration from ChronJobber is only possible in CronJobber 1.1
- Download CronJobber v1.1 load the plugin and upgrade to the latest CronJobber version
Existing Cron-Jobs will be converted automatically into the new Format when the Plugin is enabled so no extra step do at this point.
Permission Migration:
- The Permission Prefix changed from chron to cron
- chron.add changed to cron.create
- chron.remove changed to cron.delete
Comments