cron_parser

Cron parser for Crystal language. Translated from Ruby https://github.com/siebertm/parse-cron

CronParser

Cron parser for Crystal language. Translated from Ruby https://github.com/siebertm/parse-cron. It is parse a crontab timing specification and determine when the job should be run. It is not a scheduler, it does not run the jobs.

Installation

Add this to your application's shard.yml:

dependencies:
  cron_parser:
    github: kostya/cron_parser

Usage

require "cron_parser"

cron_parser = CronParser.new("30 * * * *")

# Comming times
p cron_parser.next(Time.now)
p cron_parser.next(Time.now, 5)

p cron_parser.next(Time.utc_now)
p cron_parser.next(Time.utc_now, 5)

# Times that have been
p cron_parser.last(Time.now)
p cron_parser.last(Time.now, 5)
Repository

cron_parser

Owner
Statistic
  • 11
  • 2
  • 0
  • 8
  • 0
  • over 3 years ago
  • October 31, 2015
License

MIT License

Links
Synced at

Wed, 06 Nov 2024 13:23:41 GMT

Languages