to prevent any misbehavior of the cron daemon, please stop the daemon before starting any OS upgrade
Frontend for the cron scheduler. Makes it easy to view your schedules in a more friendly way.
Also gives the opportunity to fully manage crontabs of nemo and root. The usual warning: always be careful with root permissions. Disabling is achieved by adding a specific comment string in the cron entry.
Displayed commands can be replaced by a more meaningful text.
Using cron-descriptor for the conversion of cron expressions into human readable strings.
Using python-crontab for the cron timestring syntax check.
Needs vixie-cron or cronie as cron daemon, which can be found in my repo.
Loading a large crontab can cause some unresponsiveness.
If you want to play more with the crontab syntax, you can have a try here: http://www.corntab.com/pages/crontab-gui
Why use cron as a scheduler?
Swedish translation: eson
Sources can be found on github
Comments
aerique
Sun, 2021/01/10 - 03:29
Permalink
Hi, I had two issues to get this working on a fresh 3.4.0.24 install on an F(x)tec Pro1:
- `cron.allow` only contained `nemo` and not `defaultuser`
- `crontab -e` was looking for `/usr/bin/vi`, which for me was in `/bin`
ade
Sun, 2021/01/10 - 12:13
Permalink
Thank for your feedback. Both issue are not Sailcron related. That gives me the impression the defaultuser changes in Sailcron itself where sufficient (as I could not test it myself).
When you are talking about cron.allow it must be Cronie that you are using. And you are correct, defaultuser is not added to that list yet. I will upload an updated version.
As for the "crontab -e" command: I do not think that is cron related, but depending on EDITOR settings. Mine is vim, which is located in /usr/bin.
aerique
Tue, 2021/01/12 - 01:33
Permalink
Yes, you're right. I did not think this through (it was late ;-)) and it is indeed Cronie that I am running.
As for `$EDITOR`, I do not have it set and I also have Vim installed. Anyway, if I'm the only one to report this then the fault is probably on my side.
ade
Tue, 2021/01/12 - 01:47
Permalink
There is your problem:
and crontab -e will work.
aerique
Tue, 2021/01/12 - 14:22
Permalink
I realize that :-)
What I meant to say is that on a freshly installed phone it will not work for people. But the ones who can't figure it out probably would not install cron ;-)
ade
Tue, 2021/01/12 - 14:46
Permalink
That is very likely. But in theory, you don't need to use crontab -e when you use Sailcron :-)
aerique
Tue, 2021/01/12 - 18:06
Permalink
I was moving settings from another phone :-)
wickedsp1d3r
Sat, 2021/01/02 - 16:12
Permalink
If I would like to uninstall it, which all traces do I need to delete? Thanks.
ade
Sat, 2021/01/02 - 16:45
Permalink
Just the related folder in .config, as is the case with most Sailfish apps.
carmenfdezb
Mon, 2020/08/10 - 12:29
Permalink
Does it work on SailfishOS X? I'm trying to run a script as nemo user using sailcron, but it doesn't work for me: it doesn't do anything. If I run script manually from Terminal, it works fine.
ade
Mon, 2020/08/10 - 13:53
Permalink
Sounds like a cron issue, not typically a sailcron issue.
How does the generated crontab line look? ("crontab -l" and find the entry)
And what does the script execute? It might be missing some environment settings you have at your disposal when running from the terminal.
Another way to debug it would be to add "> /tmp/mycronoutput.txt 2>&1" to the crontab line and see if gets created and what the content of the file is afterwards.
carmenfdezb
Mon, 2020/08/10 - 23:21
Permalink
Thank you for your answer! I've been trying with this simple command:
echo "This is a test" > /home/nemo/tmp/test.log
but it doesn't do anything. This entry is showed if I run
crontab -l
from Terminal.ade
Tue, 2020/08/11 - 00:05
Permalink
should give a scheduling moment like
Is there no scheduling in the this cron line? If there is not, the crontab entry is invalid.
I assume cron is running (else sailcron would complain). Is there any error when you start sailcron via the terminal and add a new entry?
carmenfdezb
Tue, 2020/08/11 - 09:14
Permalink
nemo ~ $ crontab -l
*/5 * * * * echo "This is a test" > /home/nemo/tmp/te
st.log
If I start sailcron from Terminal I don't get any error:
nemo ~ $ harbour-sailcron
[D] unknown:0 - Using Wayland-EGL
[D] unknown:0 - Got library name: "/usr/lib/qt5/qml/
io/thp/pyotherside/libpyothersideplugin.so"
[D] :156 - pretty_cron module is now imported
[D] :164 - read_alias module is now imported
[D] onStatusChanged:23 - status changed
Cron service is activated and running:
nemo ~ $ systemctl status cron
● cron.service - Cronie Cron Daemon
Loaded: loaded (/lib/systemd/system/cron.service;
enabled; vendor preset: enabled)
Active: active (running) since lun 2020-08-10 21:3
7:06 CEST; 10h ago
Main PID: 24341 (cron)
CGroup: /system.slice/cron.service
└─24341 /usr/sbin/cron -s -n
ade
Tue, 2020/08/11 - 09:21
Permalink
For the record, "59 17 * * *" means run this only at 17:59 every day. If you want a (test) run every minute it should be "* * * * *".
The /home/nemo/tmp/ directory does exist? Is there log data in /var/cron/log?
carmenfdezb
Tue, 2020/08/11 - 11:30
Permalink
I've changed it to run every minute and it doesn't do anything:
nemo ~ $ crontab -l
* * * * * echo "This is a test" > /home/nemo/tmp/test
.log
/home/nemo/tmp/ directory exists, but /var/cron/ doesn't exist.
I'm using cronie, that I've installed from storeman
carmenfdezb
Tue, 2020/08/11 - 11:34
Permalink
Ok cronie use /var/spool/cron path, but I don't have any log file there
ade
Tue, 2020/08/11 - 14:10
Permalink
I thought you where using Vixie cron, but it's cronie. Good choice, as this cron is still maintained. Cronie does not have its own logfile indeed. You could try to see if this gives any clue: "journalctl -u cron" (as root).
If this gives no output, maybe give Vixie cron a chance?
carmenfdezb
Tue, 2020/08/11 - 16:48
Permalink
I've tried vixie cron and it works!!! The next step is to know why my script doesn't work, maybe environment setting is the reason.
Thank you for your help!!
carmenfdezb
Wed, 2020/08/12 - 00:00
Permalink
Finally, I've solved my problem by adding PATH parameter to my script:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ade
Wed, 2020/08/12 - 00:11
Permalink
Nice to hear you solved your problem.
You can also add that PATH entry at the start of your crontab, so it is available for all your cron jobs.
My first 3 entries are:
By default cron wants to mail errors, which is of no use on sailfish. Setting MAILTO empty wil disable this (and could spare a few cpu cycles).
carmenfdezb
Tue, 2020/08/11 - 14:09
Permalink
nemo ~ $ sudo journalctl -u cron
-- No entries --
dexic
Mon, 2020/04/20 - 19:33
Permalink
I have downloaded it manually from OpenRepos.net now.
Still doesn't work. :-(
ade
Sat, 2020/04/25 - 01:28
Permalink
There was indeed something really weird going on with openrepos which made the latest version not available. I re-uploaded the rpm's once again and now they are visible as update.
ade
Tue, 2020/04/21 - 11:10
Permalink
Then I need the terminal logs I was talking about earlier. Without them, I can't tell what is going on on your phone.
dexic
Mon, 2020/04/20 - 14:59
Permalink
I wish that I could send a screenshot of Storeman.
dexic
Mon, 2020/04/20 - 14:52
Permalink
Your changelog shows 0.4-2. Storeman offers me 0.3-1. With pkcon refresh there is nothing happening.
dexic
Thu, 2020/04/09 - 12:41
Permalink
Hello! For me it doesn't save any new entries. Xperia 10 on 3.3.0.14. Update not available. Storeman offers 0.3-1.
crontab -e gives output:
no crontab for nemo - using an empty one
/bin/sh: /usr/bin/vi: No such file or directory
crontab: "/usr/bin/vi" exited with status 127
ade
Thu, 2020/04/09 - 18:38
Permalink
But wait, you have Sailcron 0.3-1 installed??? That's not compatible with SailfisOS 3.3. You really need 0.4-2. Try a manual "pkcon refresh" or something.
ade
Thu, 2020/04/09 - 13:02
Permalink
Just tested myself, no problems here.
I suppose you have /usr/bin/vi as EDITOR env setting, but no vi installed?
Will have to investigate if that can interfer with sailcron. Maybe starting harbour-sailcron in the terminal will give extra info when you try to add an entry?
Pages