I am setting up some cron jobs, but I am getting confused. There are some directories /etc/cron.hourly, daily, monthly I dump my scripts in but they don’t get run. /etc/crontab is empty, but should have some entries for /usr/lib/cron/run-crons in there, but they are not. Actually, crons and run-crons don’t exist on my system, so there doesn’t seem anything present to actually process these cron directories and all of them are empty.
It doesn’t follow the documentation on the opensuse wiki and I am confused. Am i missing a package? Cron is from the cronie package, so it is not like I am running the old crontab software that was phased out a few year ago.
What am I missing? Is this not used anymore and the directories as just leftovers and the docs aren’t updated yet?
That’s a lot of complexity for just kicking off a simple script every hour… Now I have to manager 1) the script, 2) a service file and 3) a timer file. Instead of just managing a single script and dumping or linking it to a directory and be done with it. Sometimes simple is better.
My cronjobs (not in the the system crontab nor in the ‘hourly’, etc. files, but in roots crontab) are still functioning (I am on Leap 15.6). I assume that,seeing the enormous base of existing crontab runs in the world, systemd will support crontab by emulation for a long time.
But it could be that you need to install some “deprecated” package to get things going like @arvidjaar suggests. Just search through the OSS packages with “cron”.
/usr/lib/cron does not exist, which is where the scripts to run the cron.<interval> are supposed to be located. Perhaps its deprecated in favor a moreflexible but complex solution in systemd timers
OK, it seems installing the package cronie-anacron will actually do this. Not as per documentation on the wiki, but it creates a seperate service and config file /etc/anacron that does the runparts thing, seperate from the regular crontab
I think I’ll just move to systemd and use what is available than to keep installing stuff and wondering later if I have or want to reinstall why certain parts don’t work no more.
Seriously, I was going by documentation on the official opensuse wiki, which explicitly states opensuse uses run-crons vs run-parts like Fedora for reasons. It also states the location. Yeah, I know using Google before asking a question.
Didn’t think I’d also have to query rpm contents to verify supplied documentation first.
The wiki is slightly dated. But comparing the content of the cron/cronie file list with the wiki sheds some light.
The wiki refers to the old path /usr/lib/cron/run-crons but cronie now uses /usr/libexec/cron/run-crons. Actual users of cron could update the wiki to the actual paths.
The above is only an example.
No offense Andrei, and you can try to gaslight all you want but fact of the matter is the wiki is on the opensuse domain, endorned with the official logos, with a copyright notice of SuSE LLC (as well as contributors). For all intends and purposes, users looking for information specific to OpenSUSE, see it as official documentation. Whether or not it is maintained by employees or volunteers is irrelevant.
And yes, I’d be more than happy to help out if I have all the correct information (which I don’t at this point, too many inconsistencies) as it is an amazing source of information for opensuse users and in many ways a rival for the arch wiki.