feat(system): add cron#897
Conversation
Codecov Report
@@ Coverage Diff @@
## main #897 +/- ##
==========================================
- Coverage 99.63% 99.62% -0.01%
==========================================
Files 2160 2160
Lines 240541 240614 +73
Branches 1014 1015 +1
==========================================
+ Hits 239652 239710 +58
- Misses 868 883 +15
Partials 21 21
|
|
Targeting it for v6.3, but I don't think it will make it so fast |
Shinigami92
left a comment
There was a problem hiding this comment.
Should we also try to generate some more advanced cron strings like 23 0-20/2 * * *?
|
Should we add some range for the cron: E.g. |
i'd like to, I wanted to get the simplest expressions generated first and potentially gauge demand |
Shinigami92
left a comment
There was a problem hiding this comment.
This PR needs to update their test but we found out that to many other stuff not related to this PR within the test file is messed up
So it will not be merged in v7.0.0
|
@nhammond101 Could you please update this PR? |
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
Co-authored-by: Shinigami <chrissi92@hotmail.de>
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
Co-authored-by: Shinigami <chrissi92@hotmail.de>
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
Shinigami92
left a comment
There was a problem hiding this comment.
I would have solved it differently and maybe more readably, but my case/request are tackled and solved 👍
|
@Shinigami92 if you get a few minutes, would you post your approach? |
See here: #897 (comment) |
Adds new functionality to generate cron expressions.
New Function:
Usage:
faker.system.cron():supports an optional options object, which currently has a year component
Unit tests for the functions added.