How can I install cron on ZimaOS?
Is there any other way to execute a user script on a regular basis?
How can I install cron on ZimaOS?
Is there any other way to execute a user script on a regular basis?
ZimaOS runs on systemd, so you could try to create timers.
But I’m afraid they would survive an update.
What do you want to achieve exactly?
I would like to perform a reboot once a day and I would also like to run a script containing chmod and chown command probably hourly.
I created a systemd timer in /etc/systemd/system/ for a restart. Works fine, the server restarts as expected.
But as already mentioned, ZimaOS is immutable and I’m afraid the timers won’t survive an update.
Maybe this would be a great feature in the UI for an upcoming version?
Thank you for reaching out to discuss your intention to run cron. We are actually more interested in understanding why you need this feature and what scripts you plan to run with cron. You mentioned wanting to run chmod and chown. Could you please explain why you would need to execute these commands?
Understanding these questions helps us better grasp your actual needs, thereby allowing us to provide more accurate and effective solutions. If it is convenient for you, please provide specific requirements. We will carefully discuss them and decide whether to introduce relevant solutions to address them. Thank you.
Well, I’ve got nextcloud running and I would like to have cron for setting up background-jobs as the update of rss-feeds for instance.
Usually, on all my former Docker servers I also a had a Cronjob / Timer running for regular backups.
Simplified, it did stop all running containers, rsync their data away to a backup destination, and restart all containers again.
I know this can be achieved by Duplicati e.g., but then you cannot stop and backup Duplicati itself.
So some GUI functionality in ZimaOS for regular tasks would be really helpful.
Oh, and usually I run regular S.M.A.R.T. tests. But this is some function which could be interesting for all regular users in the normal web interface.
openmediavault offers scheduled S.M.A.R.T. tests, e.g.:
For my case, I need to run snapraid every midnight. I need a cron to do it. And I might need to run some other schedule job too later. Please enable cron on ZimaOS.
@WuzzyFeasel @siganberg Got it~ Thanks for your feedback. It will be discussed.
Just FYI:
Custom systemd timers created in CLI do survive an update.
So this is a workaround until there will be some convenient graphical interface hopefully.
Hi, good news! The dcron will be added!
I’m a relative newbie to Linux and I will have to look into systemd.
I use my ZimaOS server as a media server, the media folders are mapped as network drives on a Windows PC I have and I ‘drag and drop’ files into these folders. They have incorrect owners and permisssions, I think related to the owner of the file creation process or the file transfer process and in order for the media player to access them I need to chmod/chown the files so the media user has access to them.
I fully understand that Linux allows multiple ways to achieve the same or similar things, possibly the media user could be granted access to another group so it defaults to having access to all created/transferred files but with my limited Linux skills and the restrictions of ZimaOS Linux my solution, until I hit the missing cron option, seemed most straightforward
Has this feature been added? I would also like to use crontab. When I reboot, Pihole can’t start on its own because dnsmasq interferes. So I would like to create a script that runs on startup to kill dnsmasq, allowing Pi-hole to start without me having to ssh in.
dcron is included in 1.4.0 beta, and will be added in the stable release.
However, it is suggested that you use systemd to make a startup job.