-
-
Notifications
You must be signed in to change notification settings - Fork 146
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 a cron-like systemd::timer interface #374
Comments
@anarcat I think its a good idea. Indeed95% of cron jobs are
Maybe this should be an interface in https://github.com/voxpupuli/puppet-cron -probably not. |
I did write systemd::timer a while back, but what you're suggesting sounds like adding a systemd::manage_unit style layer on top. That sounds useful to me. As reference: this was the original reason I wanted the systemd::timer resource: https://github.com/theforeman/puppet-puppet/blob/master/manifests/agent/service/systemd.pp. As you can see, https://github.com/theforeman/puppet-puppet/blob/b08528470b9a95ba659f308ca2cafc6bec084c37/templates/agent/systemd.puppet-run.timer.erb#L8 isn't really a complete implementation of the cron spec. Perhaps it makes sense to write a |
i would rather not. i would like to eventually remove that module if we stop using cron altogether, and putting the shim there would make that difficult. thinking about this more: i think we should have a straight out compatibility shim in there. and yes, systemd doesn't provide the exact same interface, but we can let the user shoot themselves in the foot there, i think. i would do a |
This helper will allow to define a timer in a cron like way, and will setup a crresponding timer and service. In basic usage it only requires a command, user, timerspec and an ensure parameter. For addtional feaures the parameter `service_ovverides`, `timer_overrides`, `service_unit_overrides` and `timer_unit_overrides` can be used to define addtional aspects of the create units. The correct order of the units is also ensured. fixes voxpupuli#374 related to voxpupuli#287
This helper will allow to define a timer in a cron like way, and will setup a corresponding timer and service. In basic usage it only requires a command, user, timerspec and an ensure parameter. For additional features the parameter `service_overrides`, `timer_overrides`, `service_unit_overrides` and `timer_unit_overrides` can be used to define additional aspects of the create units. The correct order of the units is also ensured. fixes voxpupuli#374 related to voxpupuli#287
I did create a MR as a proposal. I have been maintaining and using https://github.com/TheMeier/themeier-systemd_cron for years. This is an adaption of this module to fit inside puppet-systemd and make mine obsoletet 😄 |
This helper will allow to define a timer in a cron like way, and will setup a corresponding timer and service. In basic usage it only requires a command, user, timerspec and an ensure parameter. For additional features the parameter `service_overrides`, `timer_overrides`, `service_unit_overrides` and `timer_unit_overrides` can be used to define additional aspects of the create units. The correct order of the units is also ensured. fixes voxpupuli#374 related to voxpupuli#287
This helper will allow to define a timer in a cron like way, and will setup a corresponding timer and service. In basic usage it only requires a command, user, timerspec and an ensure parameter. For additional features the parameter `service_overrides`, `timer_overrides`, `service_unit_overrides` and `timer_unit_overrides` can be used to define additional aspects of the create units. The correct order of the units is also ensured. fixes voxpupuli#374 related to voxpupuli#287
This helper will allow to define a timer in a cron like way, and will setup a corresponding timer and service. In basic usage it only requires a command, user, timerspec and an ensure parameter. For additional features the parameter `service_overrides`, `timer_overrides`, `service_unit_overrides` and `timer_unit_overrides` can be used to define additional aspects of the create units. The correct order of the units is also ensured. fixes voxpupuli#374 related to voxpupuli#287
This helper will allow to define a timer in a cron like way, and will setup a corresponding timer and service. In basic usage it only requires a command, user, timerspec and an ensure parameter. For additional features the parameter `service_overrides`, `timer_overrides`, `service_unit_overrides` and `timer_unit_overrides` can be used to define additional aspects of the create units. The correct order of the units is also ensured. fixes voxpupuli#374 related to voxpupuli#287
This helper will allow to define a timer in a cron like way, and will setup a corresponding timer and service. In basic usage it only requires a command, user, timerspec and an ensure parameter. For additional features the parameter `service_overrides`, `timer_overrides`, `service_unit_overrides` and `timer_unit_overrides` can be used to define additional aspects of the create units. The correct order of the units is also ensured. fixes voxpupuli#374 related to voxpupuli#287
This helper will allow to define a timer in a cron like way, and will setup a corresponding timer and service. In basic usage it only requires a command, user, timerspec and an ensure parameter. For additional features the parameter `service_overrides`, `timer_overrides`, `service_unit_overrides` and `timer_unit_overrides` can be used to define additional aspects of the create units. The correct order of the units is also ensured. fixes voxpupuli#374 related to voxpupuli#287
This helper will allow to define a timer in a cron like way, and will setup a corresponding timer and service. In basic usage it only requires a command, user, timerspec and an ensure parameter. For additional features the parameter `service_overrides`, `timer_overrides`, `service_unit_overrides` and `timer_unit_overrides` can be used to define additional aspects of the create units. The correct order of the units is also ensured. fixes voxpupuli#374 related to voxpupuli#287
This helper will allow to define a timer in a cron like way, and will setup a corresponding timer and service. In basic usage it only requires a command, user, timerspec and an ensure parameter. For additional features the parameter `service_overrides`, `timer_overrides`, `service_unit_overrides` and `timer_unit_overrides` can be used to define additional aspects of the create units. The correct order of the units is also ensured. fixes voxpupuli#374 related to voxpupuli#287
This helper will allow to define a timer in a cron like way, and will setup a corresponding timer and service. In basic usage it only requires a command, user, timerspec and an ensure parameter. For additional features the parameter `service_overrides`, `timer_overrides`, `service_unit_overrides` and `timer_unit_overrides` can be used to define additional aspects of the create units. The correct order of the units is also ensured. fixes voxpupuli#374 related to voxpupuli#287
This helper will allow to define a timer in a cron like way, and will setup a corresponding timer and service. In basic usage it only requires a command, user, timerspec and an ensure parameter. For additional features the parameter `service_overrides`, `timer_overrides`, `service_unit_overrides` and `timer_unit_overrides` can be used to define additional aspects of the create units. The correct order of the units is also ensured. fixes voxpupuli#374 related to voxpupuli#287
This helper will allow to define a timer in a cron like way, and will setup a corresponding timer and service. In basic usage it only requires a command, user, timerspec and an ensure parameter. For additional features the parameter `service_overrides`, `timer_overrides`, `service_unit_overrides` and `timer_unit_overrides` can be used to define additional aspects of the create units. The correct order of the units is also ensured. fixes voxpupuli#374 related to voxpupuli#287
This helper will allow to define a timer in a cron like way, and will setup a corresponding timer and service. In basic usage it only requires a command, user, timerspec and an ensure parameter. For additional features the parameter `service_overrides`, `timer_overrides`, `service_unit_overrides` and `timer_unit_overrides` can be used to define additional aspects of the create units. The correct order of the units is also ensured. fixes voxpupuli#374 related to voxpupuli#287
This helper will allow to define a timer in a cron like way, and will setup a corresponding timer and service. In basic usage it only requires a command, user, timerspec and an ensure parameter. For additional features the parameter `service_overrides`, `timer_overrides`, `service_unit_overrides` and `timer_unit_overrides` can be used to define additional aspects of the create units. The correct order of the units is also ensured. fixes voxpupuli#374 related to voxpupuli#287
I'm looking at converting my
cron
resources into asystemd::timer
but the interface to that resources is rather unwieldy. It assumes prior and rather intricate knowledge of the format of systemd unit files and makes the cron resource look extremely intuitive and fun in comparison (which is not a compliment).I think there's room for "cron-like" timer interface. We're not talking about reinventing the wheel here, probably just a little template will do. An interface such as:
Wikimedia operations people actually did this in their own
systemd
module which, strangely, is not related to this module but shares a lot of the interfaces, see their systemd::timer::job resource. It does a lot more than just create a timer though: it includes things like logging, monitoring and so on, probably not something we want to merge as-is just now. I mostly cite it as an example of how things could be done.It makes conversions much easier, here's a patch of one conversion. I particularly like the
> /dev/null 2>&1
removal, personally. :)I mostly open this to get feedback, I'm likely going to implement this on our side anyway, but I figured it could be useful for folks here if I send it as a PR instead of just our secret sauce. See our internal ticket as well.
The text was updated successfully, but these errors were encountered: