Skip to content

Commit

Permalink
docs: update README to include isCronTimeValid function usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
WillianAgostini committed Feb 19, 2025
1 parent c770c73 commit 873341d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 873341d

Please sign in to comment.