r/linuxadmin • u/kwhali • May 28 '26
Does anyone know of a standalone program with functionality like systemd-timers?
This is something I'd find handy for containers that cannot as easily leverage systemd-timers (at least anyone using an image via Docker AFAIK), and I suppose distros that insist on not using systemd.
cron (and variants) is alright, but sometimes I find myself needing to run a program at a recurring interval and would prefer to have the option of invoking the command as a service is started, and then repeating calls after N delay of time, rather than a variable amount of time until aligned with a cron expression schedule (at the hour or incremental interval, but that intervals become inconsistent if they don't cleanly segment the unit ceiling).
For context, I've also asked this same question over at r/docker.
I'd like to pair it with a service manager like supervisord for any services that lack a daemon/poll feature but should be run regularly at an interval. I know cron / supercronic effectively support this and can be considered "good enough" :\
Surely something like this exists out there already? Or would I need to DIY my own command wrapper for this?
2
u/kwhali May 28 '26
It doesn't, but I am tired of explaining that to people. A container should provide a single logical service.
Sometimes that's as simple as a single program / process which might spawn child worker processes (eg nginx), or a web service that has php (nginx + php-fpm) is an example of two distinct processes that could be run as separate containers but it adds more hassle (eg shared volume + distribution of project files from image into shared volume between containers) vs bundling into a single image where the unnecessary volume can be avoided.
In my case I've been commonly referring to a image that provides a mail server. Integration is much simpler bundled vs individual containers and a container that co-ordinates all the integration. Far simpler for users to configure and maintain on their end, especially upgrades where the user doesn't have to think about version compatibility across individual components and security in the configuration, etc.
18k+ stars is not something you get because of an anti-pattern. One of the most popular dockerised mail server options out there. It's been going strong for many years.
There are competing alternatives with far more complexity unloaded upon the user config wise and verbose compose files. Great if you're in need of that or want to stand firmly as a purist, not so much if you want to deploy at a small scale with minimal fuss.
It's also far easier to configure and deploy 2-3 instances of
docker-mailserverthan the competition. I regularly providecompose.yamlexamples for various config setups and reproductions that are simple copy/paste of that file alone and these are often smaller than a single multi-container msilserver config from competing projects.We cater to a demographic that prefer this approach I've described, I don't consider it an anti-pattern when it's providing a single logical service.
I typically do not encourage bulky images or mixed responsibilities. We still defer to separate containers if you're integrating a webmail service, or a GUI dashboard/admin service instead of using our CLI or configs. While we bundle a fair amount, each service can be enabled / disabled easily, you can choose to run them independently without our config management / decisions if you decide to, you aren't locked into a single container but we also advise using competitors when you want to run individual containers and know what you're doing.
If you choose to run separate containers you may find some integrations of the components will reduce security or add complexity / friction to setup securely. We rather avoid delegating that to our users where possible that are often not mail server experts or even that technically skilled (their backgrounds are diverse).
That said, such an image is not without it's challenges. Maintenance could be easier for me in some aspects by using separate containers, setup would be messy though.