Giter VIP home page Giter VIP logo

Comments (4)

traylenator avatar traylenator commented on September 28, 2024

@anarcat I think its a good idea.

Indeed95% of cron jobs are

  • run X
  • daily, weekly or every 2 minutes.
  • run as user Y
  • Maybe some random component.

Maybe this should be an interface in https://github.com/voxpupuli/puppet-cron -probably not.

from puppet-systemd.

ekohl avatar ekohl commented on September 28, 2024

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 cron2timer() function and leave it up to the end user to combine the two?

from puppet-systemd.

anarcat avatar anarcat commented on September 28, 2024

Maybe this should be an interface in https://github.com/voxpupuli/puppet-cron -probably not.

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 systemd::timer::cron define that would match the cron interface and shove that in a OnCalendar thing and call it a day, to be honest. that would sweep a lot under the rug (like syntax differences between OnCalendar and cron, email notifications and so on), but that's things i expect people would handle during the conversion. we could even have docstrings pointing out those caveats...

from puppet-systemd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.