Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Cron format validation #2301

Open
Substancia opened this issue Oct 1, 2023 · 2 comments
Open

Add support for Cron format validation #2301

Substancia opened this issue Oct 1, 2023 · 2 comments

Comments

@Substancia
Copy link

Cron schedule formats (* * * * *) don't seem to have validation support in this tool. We could have a new support isCron().

If this sounds alright, I would like to be assigned to this and start with this immediately.

@zhibirc
Copy link

zhibirc commented Oct 20, 2023

Just FYI, Cron syntax may vary slightly and may have different variations/implementations in various platforms and tools. So this is a high chance that some syntax variations (pretty valid in some systems) will be invalid here. Just thoughts :)

@mahyarmirrashed
Copy link

I made a library, cron-compose, that inherently validates the standard version of Cron strings (both seconds and non-seconds formats). You could potentially pull it as a dependency (https://bundlephobia.com/package/cron-compose@latest). It's entirely self-contained code so it would not be large to include as part of the library. Feel free to pull parts from it if needed to do your own implementation of the Cron format validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants