Inquiry About Generating 6-Field Cron Expressions
Hello,
I am using your react-cron-generator library and I appreciate your work on this project. Currently, the library generates a 7-field cron expression, including the seconds field. However, I need to generate a 6-field cron expression without the seconds field.
Is there an option or configuration in your library that allows generating 6-field cron expressions? If not, could you guide me on how to modify the code to achieve this?
Thank you for your assistance.
Best regards,
@wsebapple Thanks for using the package.
You can remove the first value from 7 cron values the first one refers to seconds.
value.substring(2, value.length),
But don't do this in onchange function!. do it when you are saving it!.
But, as of now generator is only accepting 7 cron values. I will try to update the package very soon.
Also found a bug - https://github.com/sojinantony01/react-cron-generator/blob/master/src/lib/cron.tsx#L43 when trying to parse 6 value cron to 7 value. it is adding year instead of seconds!
@sojinantony01 Hello, can this feature be supported? Adapt and generate spring java cron expressions.
Thank you very much
Best regards,
6 value cron expressions are already supported as input, but when you are reading it back it will be 7 value cron. but you can convert it as i mentioned above.
You can remove the first value from 7 cron values the first one refers to seconds. value.substring(2, value.length),
https://sojinantony01.github.io/react-cron-generator/
result: 0 0 00 L-2 1/1 ? *
https://tool.lu/crontab/
but, it is error.
@SojinAntony @sojinantony01
@zyclove But, in few other websites the expression is valid
Eg: https://crontab.cronhub.io/ , http://www.cronmaker.com/?1
0 0 00 L-2 1/1 ? * - 7 cron
0 0 00 L-2 1/1 ? - 6 cron
both are showing as valid
This seems to generate Quartz cron expressions ? So it doesn't work on UNIX ?