GitXplorerGitXplorer
k

cron_parser

public
11 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
d3a2abf826763f76bba5cfcd61eadc386210ef39

update to crystal 1.0

kkostya committed 4 years ago
Unverified
94c73e0c4fa9b22e67835575407679a2d2ce86aa

fix for 0.32

kkostya committed 5 years ago
Unverified
f24429c15c4a436ab765a59fcf6b3a56f5552c23

fixes for 0.32

kkostya committed 5 years ago
Unverified
86c7c7d49905abf4c639ecec16e56df5d9459dff

0.2.0

kkostya committed 7 years ago
Unverified
a9d5262ac06852a7bc6361dfa5dc64c808e34108

fix time location

kkostya committed 7 years ago
Unverified
840587b52e84e22c6aaae00b3a2a41da4773c9a1

fix time at

kkostya committed 7 years ago

README

The README file for this repository.

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)