1.1.12 • Published 3 years ago

aws-cron-parser v1.1.12

Weekly downloads
437
License
MIT
Repository
github
Last release
3 years ago

AWS Cron Parser

npm circleci benchmark codacy

This utility was built to process AWS Cron Expressions used by Amazon CloudWatch. It can support all the specs listed in the link below, including the special wildcards L W and #.

Specs

AWS Cron Expression specs

Installation

npm install aws-cron-parser

Usage

There are only 3 methods: parse, next, and prev

import awsCronParser from "aws-cron-parser";

// first we need to parse the cron expression
const cron = awsCronParser.parse("9 * 7,9,11 5 ? 2020,2022,2024-2099");

// to get the first occurrence from now
let occurrence = awsCronParser.next(cron, new Date());

// to get the next occurrence following the previous one
occurrence = awsCronParser.next(cron, occurrence);

// and use prev to get the previous occurrence
occurrence = awsCronParser.prev(cron, occurrence);
1.1.12

3 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago