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 option to validate crontab file #59

Closed
fcappi opened this issue Jun 8, 2020 · 1 comment · Fixed by #60
Closed

Add option to validate crontab file #59

fcappi opened this issue Jun 8, 2020 · 1 comment · Fixed by #60

Comments

@fcappi
Copy link
Contributor

fcappi commented Jun 8, 2020

Hi guys,

I would like to propose the addition of a new option that would allow us to only validate the crontab file and do NOT update the user config.

This would be very helpful in scenarios where you want to validate the crontab before actually updating the user configuration.

Examples:

  • crontab file is automatically generated, but the config updates will be applied in a later moment;
  • user input validation on CI/CD pipelines;

Since the edit option already validates the file, I think it should be an easy change to add this feature, cause the validation logic is already in place.

What do you guys think about that?

If you agree, I would be glad to help, making the changes and submit a PR.

Suggestion:

crontab -v <crontab_file_path>

Thanks!

@t8m
Copy link
Member

t8m commented Jun 9, 2020

This is a good RFE proposal. If you want to work on a PR, please go ahead.

fcappi pushed a commit to fcappi/cronie that referenced this issue Jun 10, 2020
fcappi pushed a commit to fcappi/cronie that referenced this issue Jun 10, 2020
@t8m t8m closed this as completed in #60 Jun 11, 2020
t8m pushed a commit that referenced this issue Jun 11, 2020
* Add new option to test a crontab file syntax without installing it
* Fix code style issues in crontab.c
Closes #59

Signed-off-by: Fernando Cappi <[email protected]>
Co-authored-by: Fernando Cappi <[email protected]>
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

Successfully merging a pull request may close this issue.

2 participants