to prevent any misbehavior of the cron daemon, please stop the daemon before starting any OS upgrade
Cron is a standard UNIX daemon that runs specified programs at scheduled times.
Paul Vixie's cron adds better security and more powerful configuration
options to the standard version of cron.
Vixie Cron has been adapted for Sailfish OS by Zeamoceq to prevent timer sleep issues.
Sources can e.g be found on github.
I uploaded this package in my repo as it is a dependency of Sailcron.
Please consider NOT using vixie-cron, but a maintained cron program: cronie
Attachment | Size | Date |
---|---|---|
vixie-cron-3.0pl1-1.armv7hl.rpm | 20.33 KB | 10/02/2016 - 23:10 |
vixie-cron-3.0pl2-2.armv7hl.rpm | 20.76 KB | 22/02/2018 - 00:22 |
vixie-cron-3.0pl2-2.i486.rpm | 26.34 KB | 18/02/2019 - 02:12 |
vixie-cron-3.0pl2-2.aarch64.rpm | 32.46 KB | 15/06/2021 - 23:16 |
User will now keep its secondary groups when running from cron, so for example some network permission problems on Xperia X should be solved (thanks @juiceme)
Comments
carmenfdezb
Tue, 2021/06/15 - 21:17
Permalink
Could you please add aarch64 package for Xperia 10 II? For some reason, cronie never worked on my Xperias
ade
Tue, 2021/06/15 - 21:35
Permalink
I do remember that weird problem. Sounds like the perfect opportunity to give cronie another chance on a this new device first?
carmenfdezb
Tue, 2021/06/15 - 22:07
Permalink
Yeah, I've already tried on my Xperia 10 II, but it doesn't work, cronie service is running but it doesn't run my script. However, the same script works on my Xperia XA2 with vixie-cron
ade
Tue, 2021/06/15 - 23:18
Permalink
Uploaded an attempt for an aarch64 build.
carmenfdezb
Wed, 2021/06/16 - 01:04
Permalink
Thank you so much!! I've installed vixie-cron, but I can't start service: not found cron.service unit file. This happens because cron.service is in '/lib/systemd/system/' instead of '/usr/lib/systemd/system/'. Atm I solved it with a symlink, but I get the next warning when I open harbour-sailcron: cron daemon is not running, however it's running
ade
Wed, 2021/06/16 - 01:36
Permalink
It's been a long time since I have looked at vixiecron.
About the warning that cron is not running: are you missing the procps-ng package?
should give you a number (pid) of the running vixiecron process. If the result is empty or an error it will give that warning.
About the location of the service file: it is the same as for arm7hl and i486 package, and that worked in the past.
carmenfdezb
Wed, 2021/06/16 - 09:21
Permalink
Yep, pgrep command doesn't give any result.
I will use my Xperia XA2 for testing so I will try cronie there again. I hope I will find the reason that it doesn't work for me. Could you tell me what device you use? I would like to know if you use Xperias like me.
ade
Wed, 2021/06/16 - 09:53
Permalink
I am using a Xperia XA2 right now with cronie. But I am pretty sure it does not matter what device you are using.
If you say you have vixiecron running, the pgrep command should provide output. Does systemctl status or ps indicate crond is indeed running?
ps the 'cronie' cron process is named cron btw, not crond.
carmenfdezb
Wed, 2021/06/16 - 18:50
Permalink
systemctl status says that cron.service is running and my script worked with vixie-cron. It is very weird that cronie doesn't work on my phones
EDIT: Well, I've tried cronie again and it works!! I wasn't adding path variable correctly, that was the reason that it didn't work. Sorry for all and thank you for your help
ade
Wed, 2021/06/16 - 19:24
Permalink
Great that it is sorted out now!
ade
Mon, 2019/02/11 - 21:50
Permalink
It's a bit tricky to mount via cron. First of you do not have control over the exact moment it tries mounted, it could be too early. A more proper way would be using systemd's mount unitfiles, which has ordering/dependencies.
But if you want to use cron: if the mount happens too early, you could prestart your command with a "sleep 20" for example. And if you want to see what happend: add "> /tmp/mymount_result.txt 2>&1" to your line. You can inspect that file after reboot to see a possible error.
levone1
Tue, 2019/02/12 - 00:13
Permalink
I see... So you're saying if it tries to mount, but it fails because of some other system startup issue, then that's all it will do, and it will never actually mount, so the 'sleep 20' refers to a 20-second wait, before it attempts to mount? So I could really play it safe and just use 'sleep 60' or something... Anyway, I guess the only reason I was even hung up on the @reboot is because it seemed like the best option for something like a folder mount, which you only have to do once per boot. I could just as easily set it to do it every 15 minutes or every hour, and it wouldn't hurt anything, right?
...Which makes me wonder - if I schedule something to run every 15 minutes, does it attempt to do it at boot also, or wait until 15 minutes after?
Thanks
ade
Tue, 2019/02/12 - 00:31
Permalink
If you want to know what is going on, try to log to a file as I suggested. I would not use a repeating interval.
So try:
See if it get's mounted, otherwise check the file /tmp/mymount_result.txt for errors.
levone1
Tue, 2019/02/12 - 04:27
Permalink
sleep 30 worked. Mounted at boot... Thanks again
levone1
Mon, 2019/02/11 - 21:32
Permalink
New to cron - question... I have made a script to mount a local folder, (tested in terminal, and works). I put the script in /usr/local/bin/ and set permissions 0755. I installed a new cron job, with devel-su, (script uses --bind), to run the script at boot: "@reboot /usr/local/bin/(script).sh". Cron output shows job installed, no error, but folder is not mounted on reboot. Also tried with script in /home/nemo.
Also, anything I've read on cron indicates a config-type file in /etc, but I have no cron files anywhere in /etc. There's one similar file in /lib/systemd... but has different info... What am I missing?
Thanks