Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cron-exp-lib

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cron-exp-lib

libry to generate cron expression

  • 0.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-81.82%
Maintainers
1
Weekly downloads
 
Created
Source

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)

Keywords

FAQs

Package last updated on 02 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc