Tab Format

There are two "tab"s that are parsed: one for scheduled scripts, and the other for events.

CronClone "tab.scc"

SimpleCronClone uses the crontab format, but because that is slightly confusing here are some examples and uses:

# +----------------> Minute
# | +--------------> Hour
# | | +------------> Day of month
# | | | +----------> Month
# | | | | +--------> Day of week
# | | | | | +--> Script/File
# | | | | | |
# This executes the script "sayHello.scc" every minute of every hour of every day forever.
  * * * * * sayHello.scc
# This runs the script every fifteen minutes of every day forever.
  */15 * * * * rules_reminder.scc
# This runs the backup every 2 hours on the 45 minute mark
  45 */2 * * * backup.scc
# Warn about impending daily restart at 4:55 AM server time (what ever timezone the server is in)
# Note that hours are in 24 hour format, not AM/PM
  55 4 * * * restart_warning.scc

As of v1.1, you can now also in-line commands into the tab. Note that there are some limits on what can be put as a command (single line, not too long and a pile of other things) so be careful, if you find something that you think should be able to work as a in-line command and it does not, please leave a comment/open a issue so that we can work it out.

Example:

  * * * * * do say hello I am a in-line command!

Also as of v1.1, due to adding in-line commands, we now also allow passing of arguments to the .scc file (yay bonus feature!), see script format about how arguments work.

Example:

    * * * * * examples/exampleArgumentTest.scc arg1 arg2 arg3

If you have any interesting uses, let us know!

EventEngine "tab.sce"

The EventEngine uses a YML based configuration as of v1.1, at the root level of the yml is a collection of event names, one for each event that the EventEngine acts on, find a list of those here. Inside of each event is a yml list of sub configurations for each "script" to run. each "script" must have either a "file" (pointing to a .sce file, like how CronEngine paths work) or a "command" that is just one single command to run (eg "do list" or such).

An example of the bare minimum for both a "file" event handler and a "command" event handler:

hourChange:
    - command: 'do say allevents:::$0:$1:$2'
    - file: 'events/hourChange.sce'

and so on and so forth for all the other events.

new in v1.3

Finally got around to fixing events with UUIDs. So few used them that I just did a straight swap on the PlayerName --> UUID. If this causes you problems please drop a line.

Filters (new in v1.1) These are what required the file format change, this addition allows you to filter events based on certain strings. The format is added onto the list of "scripts" as seen above, where you add a "filters" tag, with what is to be filtered and how. Current filters are "worlds" and "players".

Example of a onPlayerJoin event that when some one famous logs in, announces it for all players to see:

playerJoin:
    - command: 'do say famous person admalledd has logged into the server!'
      filters:
          players:
              - ddef6ca3-03fd-4271-816f-6400c2633ae4

you can also filter based on worlds, for example lets say you want to announce when people leave/enter the hub world and where they came from/went:

playerTeleportWorld:
    - command: 'do say player $1 used the hub world! from world $2 to world $3'
      filters:
          worlds:
              - hub

the "-" in front can invert a filter, meaning that the event will not run if one of the filters matches. For example say you want to ignore the world "hub" from one of your "playerTeleportWorld" scripts:

playerTeleportWorld:
    - command: 'do say player $1 teleported from world $2 to $3'
      filters:
          worlds:
              - -hub

you can of course also use multiple filters at once. Say you are trying to track a user between his use of the hub world:

playerTeleportWorld:
    - command: 'do say suspect $1 moved from world $2 to $3'
      filters:
          worlds:
              - hub
          player:
              - admalledd