This wiki is archived and useful information is being migrated to the main bzflag.org website

Bzfscron

From BZFlagWiki
Revision as of 15:59, 28 September 2010 by Cobra Fast (Talk | contribs) (more information on syntax given)

Jump to: navigation, search
Plywood hammer100x101.gif There is still documentation to be done here!! If you feel up to the task, please have a go at it. Specifically what needs to be added is:
  • cleanup the article according to the standards, and other plug-in articles.
  • explain more of how the plugin works and how to set it up.


One of the first plugins, and still arguably the most powerful, bzfscron allows you to run arbitrary /slash commands on a schedule. It supports a very complete crontab parser that closely approximates those found on most modern *nix systems.

With bzfs 2.0.x, limitations in the server API force bzfscron to use an ingenious, but hackish way to deliver its commands. An "observer" called "bzfscron" joins the server. The plugin promotes itself (the pseudo-player) to administrator automatically, so you don't need to worry about permissions. Establishing a TCP connection to one's own thread is very weird and very ugly. However, for the limited purposes of this plugin, it works.

Bzfscron in version 2.0.10 accepts a config file to to specify crontab and observer name.

Bzfscron has been completely redesigned to use a server-side player in BZFlag 2.99 and newer.

Syntax and Examples

1 * * * * /flag reset all      # reset all flags on the first minute of every hour, every day, every month
* * * * 1 /flag reset all      # reset all flags every monday
59 23 31 12 * /shutdownserver  # shut down the server at the very end of the year

* * * * * /command
┬ ┬ ┬ ┬ ┬
│ │ │ │ │
│ │ │ │ └──── Day of the week (0-7) (Sunday =0 or =7)
│ │ │ └────── Month (1-12)
│ │ └──────── Day (1-31)
│ └────────── Hour (0-23)
└──────────── Minute (0-59)

See also