Tarantool cron expression parser
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ccronexpr
.gitignore
README.md
cron-parser-scm-1.rockspec
cron-parser.lua
test.lua

README.md

Cron Parser Lua Wrapper

cron-parser is a Lua wrapper of ccronexpr C library. It parses a cron-format schedule and calculates the nearest event date.

Installation

tarantoolctl rocks install cron-parser

Example

local cron = require('cron.parser')

local expr, err = cron.parse('0 */15 * * * *')
if not expr then
    print('Error: '..err)
end

local ts = cron.next(expr)

print(os.date('%Y-%m-%d %H:%M:%S', ts))

References

ccronexpr library: https://github.com/staticlibs/ccronexpr