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

Have a way to add comment #2

Open
r0b0ji opened this issue Apr 18, 2024 · 1 comment
Open

Have a way to add comment #2

r0b0ji opened this issue Apr 18, 2024 · 1 comment

Comments

@r0b0ji
Copy link

r0b0ji commented Apr 18, 2024

Currently, there is a fixed comment _comment = "#dotbot-crontab" added to each cron. It'd be better if user can provide comment describing their cron job. It can be done by an optional field apart from mandatory cron and command. The data can have a field say comment and if present use the comment from entry, else use the default.

@r0b0ji
Copy link
Author

r0b0ji commented Apr 18, 2024

It can be done as simple as by changing the line

--- row = "{} {} {}".format(entry["cron"], entry["command"], self._comment)
+++ row = "{} {} {}".format(entry["cron"], entry["command"], entry.get("comment", self._comment))

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

1 participant