Comments (4)
@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.
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.
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)
- EL8 and EL9 need the `systemd-networkd` package installed for `systemd::network` HOT 7
- Missing WorkingDirectory parameter on Systemd::Unit::Service HOT 6
- Documentation example for `manage_unit` has wrong syntax
- create services/timers for users HOT 1
- Increase inifile version in metadata to < 7.0.0
- Module require an old version of puppetlabs-inifile HOT 2
- Feature Request for socket unit files HOT 1
- `5.1.0 puppet/systemd` reverted to an older version of `puppet/inifile`? HOT 5
- Add Debian 12 support HOT 1
- create systemd::path HOT 3
- timedatectl support HOT 2
- Add support for more security related service parameters
- Add documentation about user services HOT 2
- systemd::journald SystemMaxUse=, SystemKeepFree=,RuntimeMaxUse=, RuntimeKeepFree=, support using %'s instead of explicit sizing
- Service not enabled on systemd::timer HOT 10
- add support for purging /etc/udev/rules.d/ HOT 1
- Impossible to unset DNSStubListenerExtra= once set. HOT 2
- Invalid option `MaxFree` in `cordedump.conf` HOT 1
- manage_unit service_entry Environment can't have multiple values HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-systemd.