Skip to content

Office Scheduled Tasks

Andy Theuninck edited this page Apr 6, 2015 · 1 revision

Office provides a lightweight, web-based wrapper around cron for setting up scheduled tasks. This system only works on UNIX-y systems of course. Tasks will be executed as the webserver user as that's who's crontab it has access to.

Tasks should inherit from the API class FannieTask.

  • Properties
    • name [string]
    • description [string]
    • default_schedule [keyed array]. Keys are min, hour, day, month, and weekeday. Values are anything that's a valid cron entry
  • Methods
    • run

The properties are fairly self-explanatory. The run() method is called when scheduled and is responsible for executing the actual task.

Instances of FannieTask will be discovered and appear in the web user interface if they either:

  • in the directory fannie/cron/tasks
  • inside an active Plugin

Some non-object-oriented scripts still exist in the fannie/cron directory. These legacy scheduled tasks still work but this pattern is deprecated. Future development should use the FannieTask class.

Clone this wiki locally
You can’t perform that action at this time.