Skip to content

Parses a cron entry and returns the earliest date the job would run.

License

Notifications You must be signed in to change notification settings

jrobertson/chronic_cron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introducing the chronic_cron gem

This gem which is under development aims to facilitate plain english for cron times.

e.g.

require 'chronic_cron'

Time.now          #=> 2013-07-07 18:35:49 +0100
cc = ChronicCron.new('Fire at 10:15am every day')
cc.to_time        #=> 2013-07-08 10:15:00 +0100

cc.to_expression  #=> => "15 10 * * *"
cc.next           #=> 2013-07-09 10:15:00 +0100
cc.to_time        #=> 2013-07-09 10:15:00 +0100

cc = ChronicCron.new 'at 11:00 and 16:00 on every day'
cc.to_time        #=> 2013-07-08 11:00:00 +0100
cc.to_expression  #=> "00 11,16 * * *"

chronic_cron gem cron time expression

About

Parses a cron entry and returns the earliest date the job would run.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages