Cron weirdness in rolling

Hello,

I have Searched the forum for my issue and found nothing related or helpful
I have checked the Resources category (Resources Index)
I have reviewed the Wiki for relevant information
I have read the the Release Notes and Errata

OpenMandriva Lx version:
OpenMandriva Lx release 25.12 (ROME) Rolling for x86_64

Desktop environment (KDE, LXQT…):
KDE Plasma Slim, but it doesn’t matter

Description of the issue (screenshots if relevant):

First, it appears on a newly-installed ROME/rolling system that crond and atd are not running:

$ sudo systemctl status atd | grep Loaded
     Loaded: loaded (/usr/lib/systemd/system/atd.service; disabled; preset: disabled)

I had to manually sudo systemctl enable crond to get it to run on restart, but you can still see that the preset was for it to be disabled.

$ sudo systemctl status crond | grep Loaded
     Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; preset: disabled)

Why is this? It seems strange to have a Linux system running without cron. I have it enabled/running now, so that’s not the problem. What I’m seeing now is that an @reboot entry in my personal crontab is not actually getting executed:

$ crontab -l | grep reboot
@reboot /home/bbeyenhof/bin/start_irssi_cron

The contents of that script:

$ cat /home/bbeyenhof/bin/start_irssi_cron
screen -U -S irssi -dm /usr/bin/irssi

So, if this is executed on reboot, I should have a screen session running irssi in the background as soon as I boot the machine, but after a reboot no screen sessions are running:

$ screen -ls
No Sockets found in /home/bbeyenhof/tmp.

Is the crontab not getting executed? I’m not sure where to look next, because this is just regular Vixiecron functionality I’ve depended on for a couple of decades. How should I go about making sure this script gets executed on reboot?

In the future, please make separate posts for different issues.

cron doesn’t typically start user side things. Autostart does. The former would be more sensible in a headless environment. Which is most likely why it was not enabled by default. Either way we don’t make someone happy.

OK. I’m not asking to be made happy; I just want to understand. I know that OpenMandriva is unfamiliar to me, but I’ve never run into this sort of issue and I just want to learn how to work with it. Is crond enabled by default on the server-branded images? Are the differences between the KDE image and the server image documented anywhere?

In any case, I’ve configured userspace cron entries in Linux and UNIX for years whether or not there’s a graphical environment, so if that’s not the expected pattern I’m just trying to understand how OpenMandriva was built. I’m still hoping for screen to be executed in the userspace CLI when the system starts, whether or not I’ve started a graphical session.

It looks like, when I’m using my own crontab to attempt to start it, systemd is killing the screen process according to journalctl:

Jan 19 14:52:55 augmentedfourth CROND[733]: (bbeyenhof) CMDEND (/home/bbeyenhof/bin/start_irssi_cron)
Jan 19 14:52:55 augmentedfourth systemd[1]: session-c1.scope: Killing process 1078 (screen) with signal SIGTERM.
Jan 19 14:52:55 augmentedfourth systemd[1]: Stopping session-c1.scope - Session c1 of User bbeyenhof...
Jan 19 14:52:55 augmentedfourth systemd[1]: session-c1.scope: Deactivated successfully.

However, autostart is also failing to execute the script:

Is there anywhere that OpenMandriva expects to find a CLI script/command to run in the background on system startup?

I honestly don’t know, but I hope it would be. Otherwise, you can just enable it as part of your configuration after you “install” it.

The server image will not have a graphics server/compositor, and the Plasma images will, along with Plasma. There was a request to make formal lists, but it hasn’t been completed yet, that I know of.

Please try to include your output in the post using Markdown, not as a screenshot. We would also need to see the command along with the entire output. If it’s a custom script that you have posted on a git repo somewhere, that would also be helpful and you may link it here. In the future, that is a better topic for Development .

We aren’t that far away from other distros (in fact we are older than most) and most commonly used programs work as intended. crontab should be working, but I have no idea if that needs extra help to work with autostart

This could just mean screen terminated because your script bailed out.

I tried to copy it, but that’s the Autostart GUI and it wouldn’t permit me to select it as text. The journalctl output for the event is here:

Jan 19 15:07:37 augmentedfourth (ssi_cron)[1431]: app-start_irssi_cron@autostart.service: Failed to execute /home/bbeyenhof/bin/start_irssi_cron: Exec format error
Jan 19 15:07:37 augmentedfourth (ssi_cron)[1431]: app-start_irssi_cron@autostart.service: Failed at step EXEC spawning /home/bbeyenhof/bin/start_irssi_cron: Exec format error
Jan 19 15:07:37 augmentedfourth systemd[996]: app-start_irssi_cron@autostart.service: Main process exited, code=exited, status=203/EXEC
Jan 19 15:07:37 augmentedfourth systemd[996]: app-start_irssi_cron@autostart.service: Failed with result 'exit-code'.
Jan 19 15:07:37 augmentedfourth systemd[996]: Failed to start app-start_irssi_cron@autostart.service - start_irssi_cron.

OK, thanks. I’ll keep playing with it, then. I remember a colleague in IT doing some experiments with Mandrake around 2002, but I didn’t really get into Linux myself until 2004 or so (and then it was OpenSUSE & Ubuntu primarily). I recently started using OpenMandriva due to its inclusion on Bryan Lunduke’s non-woke software list. I’ve liked it a lot so far; it’s been a good replacement for both my ancient headless macOS machine and my DigitalOcean persistent droplet/VPS running Ubuntu Server.

Possible, but it specifically says Killing process 1078 (screen) with signal SIGTERM, so I read that as saying that something in systemd sent signal 15 directly to the process. I set KillUserProcesses=no in /etc/systemd/logind.conf and I don’t see that SIGTERM line anymore, but it’s still not leaving an open screen session.

If there’s no guidance or prior art on making this sort of thing work I’ll just keep hacking at it, though. Apparently systemd’s concept of what constitutes a session is in conflict with the ideas of screen and tmux and NOHUP that intentionally keep a session alive even without a current interactive connection.

We are also reducing the amount of icky things that systemd does/uses/controls to the extent that we can. I have no idea if that might be a factor. @bero will probably have a better idea.

For your inquiry regarding the list of installed packages, your best bet (currently) is to do a little sleuthing:

ROME x86_64 plasma6x11 ISO:

Notice the Main script:

omdv-build-iso.sh --arch=x86_64 --tree=rolling --version=rolling --release_id=snapshot --type=plasma6x11 --displaymanager=sddm

From that, we can deduce this:

… and so on through the %include’s.

Your own journal log shows that it is a Format Error with Exec:

Jan 19 15:07:37 augmentedfourth (ssi_cron)[1431]: app-start_irssi_cron@autostart.service: Failed to execute /home/bbeyenhof/bin/start_irssi_cron: Exec format error
Jan 19 15:07:37 augmentedfourth (ssi_cron)[1431]: app-start_irssi_cron@autostart.service: Failed at step EXEC spawning /home/bbeyenhof/bin/start_irssi_cron: Exec format error
Jan 19 15:07:37 augmentedfourth systemd[996]: app-start_irssi_cron@autostart.service: Main process exited, code=exited, status=203/EXEC
Jan 19 15:07:37 augmentedfourth systemd[996]: app-start_irssi_cron@autostart.service: Failed with result 'exit-code'.
Jan 19 15:07:37 augmentedfourth systemd[996]: Failed to start app-start_irssi_cron@autostart.service - start_irssi_cron.

systemd is only reporting that the service you created failed to start and exited, therefore an issue with the service you created.

I would conclude from that there is an error in how you are autostart/executing the start_irssi_cron item with your app-start_irssi_cron@autostart.service

Obviously without knowing what you are doing there we are flying entirely blind, if you cannot or wont help us to help you by providing as much detail as possible (including the code you are attempting to run) then it is not a good use of anyone’s time.

“Exec format error” typically means you’re trying to launch a binary meant for a different CPU architecture or OS, or you’re launching a script as a binary (missing markers for what interpreter should be used etc.)

The service was created by Autostart, by providing the script file as an item in its list. I didn’t write the service myself.

I gave all of that detail above. I showed a cat of the script, and I demonstrated both the cron entry I attempted and the GUI/journalctl output of including the script in Autostart (as was suggested to me). If there’s anything else specifically you’d like to see I’ll gladly show it.

Exactly! Thank you! My script, as it had been executed by cron, had no hashbang line. I put #!/bin/bash at the top of it, and now it’s executed by Autostart exactly as I’d hoped. Granted, it only runs while I have an open GUI session, but I do have SDDM doing an automatic login so it does run on every reboot. The system is headless, so I need to authenticate to VNC or SSH to get into it.

In this instance, I’m less interested in the list of installed packages and more in how the packages are configured upon installation. Like I said, I was very confused by an installed but disabled crond. I’ve never seen that in over 20 years of running Linux both personally and professionally, so I was curious if that was intentional… and, if so, what the intention was.

Uh, ok…

Here you go…

Interesting. So the specfile sets it to install the systemd service but doesn’t do anything to enable it.

However, I also see that the systemd-0 package drops /lib/systemd/system-preset/90-default.preset, which can set the vendor/distribution presets for various packages. I had assumed that crond would be one of the ones listed here, but there’s a comment in that file that “By default all services have to be enabled in their rpm packages” and asks that this file not be changed to include anything not currently defined as “core services” or systemd requirements.

@bero Would it be appropriate to submit a pull request to the cronie specfile that would configure it to enable the service upon installation? I feel that it’s kind of useless to install cron without enabling it to run, but I don’t want to impose my assumptions/desires on a distribution when I’m still pretty new to it. I don’t know very much about culture and decision-making in the OpenMandriva community yet.

Isn’t that what this is doing?

%systemd_post does not necessarily enable a service. It just does what the distribution defines as a systemd.preset, which is configured in /lib/systemd/system-preset/ and may be supplemented in /usr/lib/systemd/system-preset/. (more documentation)

ls /lib/systemd/system-preset/
85-display-manager.preset   86-ebtables.preset    86-man-db.preset              86-rpcbind.preset
86-alsa.preset              86-flatpak.preset     86-mdadm.preset               86-rtkit.preset
86-avahi-daemon.preset      86-fstrim.preset      86-multipathd.preset          86-shadow.preset
86-bluetooth.preset         86-fwupd.preset       86-networkmanager.preset      86-smartd.preset
86-clamav-freshclam.preset  86-hw-probe.preset    86-om-mirror-selector.preset  86-udisks.preset
86-cups.preset              86-irqbalance.preset  86-openvpn.preset             86-uuidd.preset
86-dbus-broker.preset       86-libvirt.preset     86-pcsc-lite.preset           90-default.preset
86-dbus-common.preset       86-logrotate.preset   86-plocate.preset             91-ostree.preset
86-device-mapper.preset     86-lvm2.preset        86-rngd.preset                99-default-disable.preset

I don’t really see how this helps us help you. Unless you were using Mandrake/driva/OMLx the entire time, I don’t see the relevance. Can you clarify what I may be missing?

Also not helpful.

You were talking about Plasma before. This is the first time you have mentioned this. It would help us to know more about how you are using it so we can determine if it is a bug or something else should be used. As I said, most people just doing GUI things, don’t really use crond. Which is what I meant here:

99% of people here are volunteers. A lot of time was wasted by omitting information and sidetracking.

You can clone the repo I linked for cronie and provide a link in Development > Packages and features requests or in the Cooker chat. It will be reviewed when possible.

I’m just saying that, in lots of experience with many distributions of Linux and UNIX, I’ve never seen cron be installed without also configuring it to run. What I’m asking about is what decisions/patterns resulted in OpenMandriva being different in this regard, because I’m curious and I want to understand.

I was never talking about Plasma. I just included it in my initial post because the new-post form asked me to indicate which desktop environment was installed. In answer to that question, I said “KDE Plasma Slim, but it doesn’t matter.” And it doesn’t.

I’m a little confused by the responses. I’m legitimately trying to get to know the distro and the community, which means inquiring about how things are run and reasons for things. Labeling my desire to understand as “not helpful” feels a little combative to me. I get that you’re all volunteers, as I’ve spent a lot of time in open-source communities over the years, but I don’t feel that any of this time was “wasted.” I learned a lot and I thank you all for providing context and understanding while I was figuring this out.

My question about submitting a pull request was more about community/culture than anything. I know how to do it, but I didn’t know if it would be appropriate to ask for a change like that. As I said before, I’m trying to understand the rationale for why things are the way they are before I propose that they be different.

As I’ve said before, not everyone is going to be happy with things. Which means things will not always be suited to tastes. When I make an observation and ask you something in a very concise and direct manner, it’s never confrontational. I don’t think you would even find that confrontational when you speak to someone in real life. Perhaps you don’t understand the burden you are asking others to take when you say something “feels like,” a problem to you absent being directly targeted with obvious insult. Some people are not passive aggressive, and text on a forum is just text. Not everyone has ulterior motives or is trying to treat you unfairly.

Not giving all the information needed in the Support thread to help you is a waste of time. If you want to go into your extensive history with other Linux and UNIX environments, Coffee break is where you do that. I’m sure that seems combative to you, also. I’m not in charge of how you view the world. Sometimes, people are really just telling you about the community that you want to know more about.

Hopefully I just answered part of that for you. I also gave you the expected way by which you submit things. Perhaps it would be best to not compare us to your other experiences with other distros to the extent that you have so many misunderstandings that you are trying to make into something I did. Clearly the two decades of bad communities has not left you with a very good experience, or the ability to identify constructive criticism. I took your criticisms and attempted to help you. Seems like a good example to set for a community.

As far as the “why?” Maybe it got missed, maybe it was a security issue, or maybe something better is on the system and that is there as a fallback for headless systems. Submitting a PR or using the Development > Packages and features requests topic gives everyone an opportunity to discuss it. Support if for helping solve problems. You solved yours by enabling the service. If you would like to pursue it, please use the topic sections I provided.

Here you’re doing to me exactly what you’re accusing me of doing. You have no idea what my motivations are or what my past experiences are, and I’m not making any of this “something you did.” I’m legitimately just trying to understand and be inquisitive, only to be told that I’m wasting your time.

Please read my messages in the same way.

I haven’t had a problem with anyone, but it seems that you’re having a problem with me. And I don’t understand that.