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

cron-expression-validator

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cron-expression-validator

Validate cron expressions

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.5K
decreased by-59.91%
Maintainers
1
Weekly downloads
 
Created
Source

cron-expression-validator

cron-expression-validator is a Node.JS library to validate quartz cron expressions.

Installation

npm install cron-expression-validator

Usage

isValidCronExpression method reqire string (cron expression) as parameter and returns boolean value

var cronValidator = require('cron-expression-validator');
var isValid = cronValidator.isValidCronExpression("* * * * * ? *"); // returns true

if(cronValidator.isValidCronExpression("* * * * * ? *")) { // returns true
	// Your code
}

if(cronValidator.isValidCronExpression("* * * * * * *")) { // returns false
	// Your code
}

Cron accepted values

Seconds: 0-59
Minutes: 0-59
Hours: 0-23
Day of Month: 1-31, L, LW
Months: (JAN-DEC and 1-12)
Day of Week: (SUN-SAT and 1-7)
Year: 1970-2099

Keywords

FAQs

Package last updated on 03 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