SimpleCronClone

There are two parts to SimpleCronClone: scheduled scripts based on a cron-like syntax, and scripts that are called when certain events occur.

SimpleCronClone

This part of the plugin mimics the behavior of cron (for Windows-Users: Planned Tasks) and allows you to schedule scripts and commands for execution. It uses the awesome cron4j scheduler written by Carlo Pelliccia and it's own very, very, very, very, very basic scripting language.

How does it work? Well, the file plugins/SimpleCronClone/tab.scc is used as crontab-file, but instead of whole commands, it only takes the names of scripts. The tab file is parsed and scheduled, and when according the the cron part, the script is ran.

The CronClone part is to help with automated tasks that every server needs help with. For example:

  • sending a message to the console every set amount of time.
  • running a series of scripts that are dependent on the server running (eg, backups, off-site backups and more)
  • running a series of in-game commands every so often (clearing logs, resetting arenas and much more, depending on your other plugins)
  • query OS programs for status or information and use that information inside of the SCC script

EventEngine

New in v1.0, the EventEngine is a extension to the normal SimpleCronClone that calls event scripts (ending in .sce) when certain events occur.

The idea of this is that now by adding scripts to plugins/SimpleCronClone/tab.sce you will be able to do certain stats gathering or any other kind of thing based on events that players themselves cause. An example is lets say you have an adventure world, you can set a script to be run saying "do say hey player $1 is now playing in $2 adventure map, go join!" when a world is no longer empty, and when the world is empty again have a script revert it to normal. This is just one of many things that could be done with the EventEngine. See the events page for what events can be scheduled and how.

** Script Format **

See here

** Tab Format **

See here

** Warning about security **

One word of warning: Whatever you'll execute, it will have the same rights as the user from which the server is run. So be careful. Also keep in mind the execution-directory of the script is the server-directory for executables, not the plugin-directory.

** Source and issue tracker **

source code bug tracker


Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Recent Files