Run script on certain time/date
Is there a way to make the OS execute a script on a certain time/date? I know that Sailfish doesn't support cronjobs, but are there any alternative way to establish the same functionality?
We have moved to a new Sailfish OS Forum. Please start new discussions there.
Is there a way to make the OS execute a script on a certain time/date? I know that Sailfish doesn't support cronjobs, but are there any alternative way to establish the same functionality?
You might wanna have a closer look to "fcron" from OpenRepos.net. Maybe it will suits your needs.
If you are using fcron package from openrepos the /etc/pam.d/fcron file is not a pam config file.
create a file /etc/pam.d/fcrontab like this:
auth sufficient pam_rootok.so auth include system-auth account include system-auth password include system-auth session include system-auth
and maybe /etc/pam.d/fcron the same.
And you can use fcrontab -e as root.
jolladiho ( 2014-04-22 20:32:50 +0300 )editThanks for this advice, it worked. So far I've only done the first step (creating the fcrontab file). The /etc/pam.d/fcron seems to be the same as /etc/fcron.conf (which I suppose is wrong for PAM). But are you saying that Ican safely replace the contents of this file too with the same content as that of the /etc/pam.d/fcrontab file?
Larswad ( 2014-04-24 10:59:53 +0300 )editSystemd supports this. Not sure from which version and up though and i have no idea which version is included in sailfish.
Hmm, I've looked in to systemd and it seems like this could really solve my problem. However, I don't get it to work. Either I've done something wrong or Sailfish doesn't support timers
EDIT: though it seems like someone has done it before: https://www.wolf-kissendorf.de/wordpress/?p=179
Xiph ( 2014-04-04 19:55:44 +0300 )editi don't think systemd on the phone supports this (it is old. only supports monotonic timers). newer version supports calendar timers, which is what you are looking for. this is available from v197 onwards. so we are waiting for jolla to upgrade systemd.
look here https://together.jolla.com/question/16434/cronjob-on-sailfish/ and https://together.jolla.com/question/15563/add-more-systemd-components/
droll ( 2014-04-07 14:00:35 +0300 )editThis thread is public, all members of Together.Jolla.Com can read this page.
Asked: 2014-04-04 18:36:29 +0300
Seen: 492 times
Last updated: Apr 07 '14
Very true! This would be awesome. There is quite a similar question that should be cross referenced here: https://together.jolla.com/question/1770/alarm-could-trigger-any-shell-command/
ibins ( 2014-04-04 21:48:19 +0300 )edit