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

Crontab: Rewrite the crontab recipe to work with sections #3708

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

ardentsword
Copy link
Contributor

@ardentsword ardentsword commented Oct 12, 2023

  • Bug fix #…?
  • New feature?
  • BC breaks?
  • Tests added?
  • Docs added?

Rewrite of the crontab contrib recipe. It creates a 'section' in the crontab without modifying the original crontab (before the whole crontab was wiped). If the cronjobs are modified it only touches the section. This removes the need to remove old 'unused' cronjobs when changing the command.

@antonmedv
Copy link
Member

Is it a breaking change?

@ardentsword
Copy link
Contributor Author

ardentsword commented Oct 12, 2023

It is not breaking for the config, but it is indeed breaking in that it duplicates the rules if they are already there.
I could write some code to check for duplicates and remove those 'outside' of the section, would that be the preferred solution?

@antonmedv
Copy link
Member

Yes, lets try this.

…to prevent breaking backwards compatibility

Generate new docs
@ardentsword
Copy link
Contributor Author

I added the new code, let me know what you think of it :)

@antonmedv antonmedv merged commit 003b4e5 into deployphp:master Oct 12, 2023
9 checks passed
@SimJoSt
Copy link
Contributor

SimJoSt commented Jan 16, 2024

@ardentsword thank you for the rewrite. It makes working with crontab much smoother and structured. Great work!

@ardentsword
Copy link
Contributor Author

@SimJoSt Thanks, you're welcome, glad to hear it is getting used :)

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 this pull request may close these issues.

None yet

3 participants