Provide cron by default

As of current OSMC (2021-12), the standard UNIX service cron is not installed by default. Otherwise, there might be tools expecting cron to be available. In my OSMC installation the two folder /etc/cron.daily and /etc/cron.hourly are populated by default, but not processed (because cron is not installed).

Of course there is an easy workaround:

apt update
apt install cron

Nevertheless you will avoid user irritation if you provide cron by default.

Regards, Michael

This is a media center. I donā€™t know why we should need cron on it by default.

Itā€™s in the OSMC App Store. What are you using under cron that youā€™d expect from a standard installation?

Iā€™m not aware of the OSMC app store.

My point is that there might be tools installed as part of OSMC which (silently) rely on cron, e. g fakertc (I myself even donā€™t know that program, but it has an entry within /etc/cron.hourly). Or apt which might do some daily housekeeping.

Anyhow I aggree with Smurphy, cron doesnā€™r make much sense on a mediacenter. But in my installation kodi is installed on a raspberry pi 3 running 24/7 while kodi itself is active only once per week. From that perspective housekeeping tasks are valuable.

Itā€™s only a suggestion to reduce user confusion for those users being accustomed to UNIX. And to them cron is really a standard utility.

Regards, Michael

1 Like

I have headless Calibre running on mine and I have a couple of commands I like to run periodically to make sure everything is running as it should, cron helps with that. I also also have a cron job that runs rsync to back up my media collection. There are also kodi commands that I like to run periodically (eg to refresh my collection, clean the database), again I use cron.

Itā€™s a pretty basic system management tool - why not include it?

Because many thousands of people would not use it on Media Center and for those using it executing the install command once would not harm.

I have calibre (headless) running on my NAS. Thatā€™s where it should go.

When I was new to OSMC, got my first secondhand pi2 three weeks before pi3 was released, I was thrilled to get back to my Linux roots, used Debian back when kernel was 1.3x. So here I was, mediacenter and a real Linux distro, not this ā€œjust enoughā€. My lack of kodi experience made me unsure how to manage files, yeah true i could add sources in the file manager and so onā€¦ but that Iā€™ve learned later.

My thought was why isnā€™t there an easy (at least for us ā€œold guysā€ that have worked with NortonCommander) file manager in shell. Why not have MC(midnight commander) installed by default on the system so all users can have a file manager in shell.

I was perplexed when I got the ā€œnoā€ answer on a feature request, I mean who doesnā€™t need a file manager? But after realizing the design idea of OSMC, I got it. First of all at that time, SD cards were smaller/more expansive, that I could somewhat accept, but what made me really accept the ā€œNoā€, was this question: ā€œWill it improve the mediacenter?ā€ Not the handling of the whole OS, but the actual Mediacenter. Since this is a OSMC, itā€™s all about the mediacenter and leaves the rest up to you. I mean how hard is it to install MC (in my case, sudo apt-get install mc). Or in your case, click Settings->MyOSMC->Store->Cron->Install->apply or use apt-get you too.

MyOSMC have moved location since I started using OSMC, and there is almost no new apps in store, but as Iā€™ve understood it, that should be changing when MyOSMC2 makes an entrance.

1 Like

Thatā€™s where it should go.

No, it should go wherever on my network it makes sense to have it.

ā€œWill it improve the mediacenter?ā€

Will the ability to run scheduled tasks on the mediacenter improve it?

No, it doesnā€™t since the way it is built. It works optimalt (close to anyway) as it is. There are cases where a huge library, almost fills the whole ram, and it has to start swapping or other cpu costly solutions to not OoM-error. Then think how sad a user would be to have another process auto starting, eating some more memory. That does nothing to the actual medicenter solution?

Not for the vast majority of users. I find autofs, nfs-server, vim, alsa-utils indispensable on my OSMC devices but none are included by default which is fine by me. But Iā€™d far rather have a minimal install that I can customise than the kitchen sink approach of the desktop distros, so where do you draw the line?

Yes, I use cron for backups but only on my daily driver that runs tvheadend and acts as a fileserver for other devices. And there are other ways than cron to achieve running a timed script which some users may prefer. As @fzinken says, cron is simple to install if you want it. Why Itā€™s in the ā€˜AppStoreā€™ Iā€™ve no idea since anyone using it is going to be a cli jockey anyway.

So the answer to your question should probably be 'only for users that know how to set up a cron job who will therefore have no problem running apt-get install cron.

1 Like

When I originally suggested to include cron, I did that, because as part of the standard OSMC installation some crontabs have been provided, but no cron demon. Thus it took me some time to discover that - I wondered why my additional cron entries never fired.

Anyhow, Iā€™m happy with the given solution (to go with OSMC appstore).

Regards, Michael

For future installations from the next update, Iā€™ll be including cron by default.

It will still be manageable via My OSMC ā†’ Services and My OSMC ā†’ App Store however.

2 Likes