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 24, 2025
1 parent bd46997 commit de1e0ee
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 de1e0ee

Please sign in to comment.