What's new? | Help | Directory | Sign in
Google
ruby-taskr
The RESTful Scheduler
  
  
  
  
    
Show all Featured Downloads:
taskr-0.2.0.gem
Links:
Join project
Project owners:
  matt.zukowski

Taskr is a stand-alone HTTP daemon, providing a cron-like networked scheduling service. Tasks are created and managed via a REST calls over HTTP, allowing other REST-aware services to schedule and manage jobs.

One common use for Taskr is to schedule jobs to be executed on remote Rails servers. However, Taskr is a far more generic tool, capable of performing a wide range of scheduled actions.

Taskr jobs can be as simple as single-line shell commands (similar to cron), but support is built-in for more complex, higher-level actions. For example, Taskr can be used to place a REST call to another RESTful service, such as sending out a timed message via the Howlr RESTful messaging daemon, or it can be used to execute arbitrary code on a remote Ruby on Rails server via the Taskr4rails plugin.

Behind the scenes, Taskr is written in Ruby using the Camping framework and uses the OpenWFEru-Scheduler.

Screenshot

Taskr's task list shown in the built-in web interface.

Installation

  1. First you'll need a Ruby interpreter installed along with the RubyGems packaging system.
  2. Install the Taskr gem:
  3. gem install taskr
  4. Run taskr from the command line. You can add the -h flag to see command line options. Also, on a Linux system you'll probably want to run Taskr as root, since by default is stores its configuration in /etc/taskr and its logs in /var/log/taskr.rb:
  5. sudo taskr
  6. The first time you run the taskr command, Taskr will create a default configuration file for you in /etc/taskr/config.yml and it will then exit. Have a look inside this file and edit it to your needs. Taskr requires a SQL database, and configuration examples are provided for various database servers (MySQL, PostgreSQL, SQLite, etc.).
  7. Before running taskr again, make sure that the database you've configured is ready to be used. For example, if you're using mysql, you'll have to create the database first:
  8. mysqladmin -u root -p create taskr
  9. You can now run taskr again. You should see it start up, and you should be able to access the web interface at http://localhost:7007/tasks.
  10. The BuiltInActionTypes page has some info about the various kinds of jobs you can schedule.

Have a look at the Downloads page for further installation and configuration help.

Usage

Taskr has a simple, self-explanatory web interface. This is by default accessible at http://localhost:7007/tasks. The web interface is meant to be intuitive, although you might want to have a look at BuiltInActionTypes for info on the kinds of actions Taskr can be scheduled to execute.

If you're interested in interacting with Taskr programmatically (i.e. via its REST API), have a look at the Documentation section below.

Once you have Taskr configured, you will probably want to run it as a background daemon. This is done using the taskr-ctl script:

taskr-ctl start
taskr-ctl status
taskr-ctl stop

You can use taskr-ctl to incorporate Taskr into your system as a background service. On Linux for example, you'll want to create an init.d script; have a look at HowToInstallAsaService.

Documentation

For information about talking to Taskr as a REST web service, have a look at the API and at sample client code for Ruby and PHP.

You'll also probably be interested in the BuiltInActionTypes and their parameters. For integration with Rails (i.e. executing remote code on Rails applications) see Taskr4rails.