From 873341d76b0429aea08ea50519a0ac74fcb93b77 Mon Sep 17 00:00:00 2001 From: Willian Agostini Date: Wed, 19 Feb 2025 00:25:58 -0300 Subject: [PATCH] docs: update README to include isCronTimeValid function usage example --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index a22150a1..adf8f685 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,15 @@ day of week 0-7 (0 or 7 is Sunday, or use names) console.log(`The job would run in ${timeout}ms`); ``` +- `isCronTimeValid`: Validates if a given cron expression is valid (returns a boolean). + + ```javascript + import * as cron from 'cron'; + + const isValid = cron.isCronTimeValid('0 0 * * *'); + console.log(`Is the cron expression valid? ${isValid}`); + ``` + ### CronJob Class #### Constructor