Skip to content

About

Crontab parsing and date computation functionality for erlang

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cronparser.erl

A cronparser library inspired by the parse-cron Ruby gem. Cronparser.erl includes functionality to parse a crontab entry and compute the next occurrence of that entry, provided a given date time.

The full library is packaged as an OTP application and can be build, tested and added as a dependency using Rebar.

Functionality

To parse a crontab line, use the time_specs function:

Spec = cronparser:time_specs("*/15 * * * *") .

To compute the next occurrence of an spec, use the next function:

Now = calendar:local_time().
Next = cronparser:next(Now,Spec).

Building

To test and build the library, use Rebar:

rebar get-deps compile eunit

The library has a dependency on edate that will be automatically resolved by Rebar.

Copyright

Released under the Apache License by Antonio Garrote (antoniogarrote@gmail.com), 2014.

About

Crontab parsing and date computation functionality for erlang

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages