Project

CronR

0.0
No commit activity in last 3 years
No release in over 3 years
Simple, thread-based, light-weight cron implementation.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

 Project Readme

CronR

Pronounced "cron-rrrr" ...

...because RubyCron was taken. So was cronic for that matter... and RCron.

CronR is a light-weight implementation of a cron-like system.

For the impatient, head over to examples/ .

For the patient, there's documentation of the Cron and CronJob classes in the code in lib/.

Consists of:

  • Cron
    • a glorified Array representing sequence of CronJob instances
    • a thread that wakes up every minute to determine if jobs are runnable
    • if so, they get put on to a queue
    • you have to deq the queue and do something with the job
  • CronJob
    • represents the standard cron parameters and some sort of payload or job to run

See Cron.rb and CronJob.rb in lib/* for current documentation.

Status

Pretty early days.

This was part of an experiment in subclassing basic datastructures and playing a bit more with threads.

Dabbled briefly with sub-minute timings - see utils.rb in lib/* but stopped after my eyes started to water. That being said there are some singleton util methods that might be of use in this regard.

Setting timezones

An instance of Cron can use a specific timezone.

Something like this

cron = Cron.new
cron.timezone = "Australia/Sydney"
cron.time #=> <time with zone>

Contact

Pretty bad with email. Try danb with catalyst-au.net as the domain.