0.0.8 • Published 4 years ago

cron-exp-lib v0.0.8

Weekly downloads
4
License
ISC
Repository
github
Last release
4 years ago

cron-expression-lib

cron-expressopn-lib is a Node.js libry to generate quartz cron expression.

Installation

npm install cron-exp-lib

usage

var cronExpression = require('cron-exp-lib');
var cron = cronExpression.generateCronExpression("YEAR", new Date(), [1,2], ["JAN"], 5);

Pass following parameters to generateCronExpression function.

  • selection (string)
  • UTCDateTime (UTCtime)
  • selectedDaysOfWeekArray (array)
  • selectedMonths (array)
  • repeatOccurence (number)

Available options

  • selection
    • SECOND, MINUTE, HOUR, DAY, MONTH, YEAR
  • selectedDaysOfWeekArray
    • Array of strings with names of week (allowed first three capital letters )"MON","WED"
    • Array of numbers with 1 to 31 5,7,21
    • Array with "L"
    • Array with "LW"
  • selectedMonths
    • Array of strings with names of months (allowed first three capital letters ) "FEB", "MAY"

Available cron patterns

Asterisk. E.g. *
Question mark E.g. ?
repeat occurrences. E.g. */2

cron accepted values

Seconds: 0-59
Minutes: 0-59
Hours: 0-23
Day of Month: 1-31, L, LW
Months: (JAN-DEC)
Day of Week: (SUN-SAT)
0.0.8

4 years ago

0.0.5

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago