RobertZenz / org.bonsaimind.bukkitplugins

Plugins for Bukkit, a free Minecraft-Server-Addition.
http://bukkitplugins.bonsaimind.org
2 stars 3 forks source link

Command to add temporary Cron/Event job #39

Open admalledd opened 10 years ago

admalledd commented 10 years ago

The idea is that sometimes you want a "one off" job that will run until the next server reboot and then be forgotten about.

The counter use-case of saving these temp jobs to disk is irrelevant by the idea that users should edit via external programs thetab.sc{e,c} files instead and then ask SCC to restart thus reloading the tab files.

Two "types" of one-offs for consideration:

Primary use case is the idea of I was wanting to do some work on my servers but wanted them to only do it when empty and only do it the one time. (shut down servers on empty single time for upgrade work)

RobertZenz commented 10 years ago

Sounds nice.

Are you planning on extending the command handling for this? You could add a schedule command which does exactly that, readTabLine() is protected, so can be called from the plugin. I'm not sure how it is with EventEngine, though.

admalledd commented 10 years ago

Yea the point was a new command for OPs and such (brainstorming here):

Note that all the FILE types up there "should" also be able to be the one-line syntax as well. Hence they are also wrapped in quotes. Again though, that syntax I just came up with now on the spot, might be better ways.

RobertZenz commented 10 years ago

Sounds good.

If possible I'd try to scrap the "add" part, as it doesn't really provide something meaningful. My suggestions to the pot of brains:

I'm not sure about the last one, though.

If it is possible I think it would be cool to have the same command for events and normal scheduling, differentiating the two only by the rest of the command.