Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

This branch is even with uu59:master

update document

latest commit f9c14f524e
uu59 authored
Failed to load latest commit information.
benchmark added core scripts
lib added core scripts
spec added core scripts
.document Initial commit to crontab-ruby.
.gitignore Initial commit to crontab-ruby.
.rspec Initial commit to crontab-ruby.
Gemfile Initial commit to crontab-ruby.
Gemfile.lock
LICENSE.txt Initial commit to crontab-ruby.
README.markdown update document
Rakefile added core scripts
VERSION Version bump to 0.0.0
crontab-parser.gemspec added core scripts

README.markdown

Usage

cron = CrontabParser.new(`crontab -l`)
now = Time.now
cron.find_all{|row|
  row.should_run?(now)
}.each{|row|
  puts "#{row.cmd} goes run just now"
}

cron = CrontabParser.new(<<-CRON)
* * * * * monitor-process
@daily mailme
@monthly full-backup
CRON

now = Time.now
cron.find_all{|row|
  row.should_run?(now)
}.each{|row|
  puts "#{row.cmd} goes run just now"
}
Something went wrong with that request. Please try again.