Module to manage Scheduled Jobs under Systemd

Cron jobs are pretty much disappearing and being replaced by Systemd timers which have more functionality like pre/post/deploy hooks.

I think a module for managing this would be quite useful, it may not be long before the old cron jobs become redundant.

What gave you that idea, has a OS said they dropping it.
Cpanel still use it and have heard no news they dropping it.

whether cron is going away or not, maybe this is something that should be added to the todo list. It’s purpose does sound like it is the ultimate goal of systemd timers but this is the first I have heard of them, but I am a windows guy.

The limitation of cron is it’s inability to run jobs at a frequency of less than a minute (unless you loads of sleep 10 statements in the cron command line to make it run every 10 seconds). So if systemd timers can run at a frequency of less than a minute, I’m all for it. In my use case I coded my own cron service which allows me to run jobs at any frequency of over a second, but systemd can do it I would use that instead

Cron will be around for years, I am not advocating for it to be removed, just asking to keep up with what has been in use now for a couple of years.

Another thing is that on my servers that use certbot standalone - with no httpd server, I now have a pre hook that enables port 80 before certbot runs, then a post hook that disables port 80 after certbot runs.

No need for port 80 to be open all the time.

I couldn’t get that to work reliably using cron, but it was probably me that was the problem.

I also made a deploy hook that only runs after successful completion that copies the new LE certs to where webmin wants them, then restarts webmin in case I need to run certbot renew in CLI again.

I’ve just finished working on a new Systemd Services and Units module that should be included in Webmin 2.650. It will support Systemd Timers and all other unit types supported by systemd.

Details are here:

2 Likes

Github 4 days ago, your on the ball :slight_smile:
Keep up the good work.

1 Like

On the conversation you put a lot of effort into the documentation, will this make it to the regular docs? If it has already, I will hang my head in shame because I am to lazy to search.

It’s not even in the regular Webmin yet!

Of course it should have some documentation, but not before the module is even finished being reviewed and merged into Webmin proper.

1 Like

I will publish docs for every new module when Webmin 2.650 is released.

1 Like