|
5 | 5 | [](https://nodei.co/npm/friendly-node-cron/) |
6 | 6 |
|
7 | 7 | Friendlier, human readable expressions for node-cron |
| 8 | +Cron Expressions are doublechecked with [crontab.guru](https://crontab.guru/) |
| 9 | + |
8 | 10 | Inspired by https://github.com/jkriss/friendly-cron |
9 | 11 |
|
10 | 12 | How to install: |
@@ -34,11 +36,29 @@ translate('invalid expr'); |
34 | 36 | // Also all Patterns which are resulting in '* * * * * *' will automatically return null. |
35 | 37 | ``` |
36 | 38 |
|
| 39 | +# Tested complex examples |
| 40 | +Look into [./test.js](https://github.com/FreaKzero/friendly-node-cron/blob/main/test.js) for more examples and the parsed cron expressions. |
| 41 | + |
| 42 | +``` |
| 43 | +at 00:00 on dec 24 |
| 44 | +every 20 seconds mondays tuesdays wednesdays |
| 45 | +at 13:37 on fridays tuesdays and thursdays |
| 46 | +At 12:10 on Monday and Tuesday in December |
| 47 | +onN saturDas In deCmbeR aT 06:01 |
| 48 | +at 9:04:52 every mondays in december |
| 49 | +on saturdays every 10 minutes |
| 50 | +very mondays in december all 15 minutes |
| 51 | +on jan feb mar only mondays tuesdays and saturdays at 9:30 |
| 52 | +every 15 minutes from 5 through 15 of december and january |
| 53 | +on march and april from 15 through 25 on every 2 hours |
| 54 | +weekly in 15 minute intervals on january |
| 55 | +quarterly at 9:30 on mondays |
| 56 | +``` |
37 | 57 | # Speech Rules |
38 | 58 |
|
39 | 59 | ## Days: |
40 | 60 |
|
41 | | -Days will always translate in numbers. `weekends` translates to `6,7` and workdays will translate to `1,2,4,5`. |
| 61 | +Days will always translate in numbers. `weekends` translates to `6,0` and workdays will translate to `1-5`. |
42 | 62 |
|
43 | 63 | You can also write the full words like `on saturday at 9:30` |
44 | 64 |
|
|
0 commit comments