Editing Fcron

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
[http://fcron.free.fr fcron] is standard Linux scheduler used to schedule any command at any time. So this means that it doesn't have any limits and you can schedule just about anything. It is run as daemon in the background so you don't need to worry about it. You set it up with a config file which contains schedule.
[http://fcron.free.fr fcron] is standard Linux scheduler used to schedule any command at any time. So this means that it doesn't have any limits and you can schedule just about anything. It is run as daemon in the background so you don't need to worry about it. You set it up with a config file which contains schedule.
-
==Alternatives==
+
 
 +
=Alternatives=
'''cron'''
'''cron'''
Line 22: Line 23:
Alarmed uses the Nokia's (non-standard) "alarmd" daemon which is already part of Maemo 5 and uses Python/Qt for GUI. You can use custom commands and set single and/or recurring events.
Alarmed uses the Nokia's (non-standard) "alarmd" daemon which is already part of Maemo 5 and uses Python/Qt for GUI. You can use custom commands and set single and/or recurring events.
-
==Current issues==
+
 
 +
=Current issues=
# Current version for Maemo is not the latest available ''(although the difference is minor)''.
# Current version for Maemo is not the latest available ''(although the difference is minor)''.
Line 28: Line 30:
# Some stuff has to be done manually after the installation ''(with proper packaging the whole "Installation" chapter from this wiki would be unnecessary)''.
# Some stuff has to be done manually after the installation ''(with proper packaging the whole "Installation" chapter from this wiki would be unnecessary)''.
# It needs to be added to official maemo.org repositories so it can be used by anyone ''(it is currently availible in user ruskie's repository)''.
# It needs to be added to official maemo.org repositories so it can be used by anyone ''(it is currently availible in user ruskie's repository)''.
 +
But these are not major things and as you can see it can be used already - current solutions and workarounds are in ''(brackets)''. Otherwise it's stable, does not have important bugs and does not affect battery life at all. It's a mature software which just needs some manual work.
But these are not major things and as you can see it can be used already - current solutions and workarounds are in ''(brackets)''. Otherwise it's stable, does not have important bugs and does not affect battery life at all. It's a mature software which just needs some manual work.
-
==Installation==
+
 
 +
=Installation=
Everything should be done from [[root access|root terminal]]. First you need to download the .deb from [https://repo.codemages.net/opt/fcron_3.0.1-2_armel_opt.deb ruskie's repository]. Put it somewhere on the device and execute the following commands, one by one:
Everything should be done from [[root access|root terminal]]. First you need to download the .deb from [https://repo.codemages.net/opt/fcron_3.0.1-2_armel_opt.deb ruskie's repository]. Put it somewhere on the device and execute the following commands, one by one:
Line 54: Line 58:
And save it. This makes fcron run at startup.
And save it. This makes fcron run at startup.
-
==Configuration==
+
=Configuration=
fcrontab is a program which parses config file so fcron daemon can use it. It is used to modify schedule. First edit fcron's global configuration file, which is located at /etc/fcron.conf. The last configuration entry (line) must be changed to:
fcrontab is a program which parses config file so fcron daemon can use it. It is used to modify schedule. First edit fcron's global configuration file, which is located at /etc/fcron.conf. The last configuration entry (line) must be changed to:
Line 63: Line 67:
  export EDITOR=vi
  export EDITOR=vi
 +
Next, fcrontab must be executed in edit mode:
Next, fcrontab must be executed in edit mode:
Line 81: Line 86:
''!nolog(true)'' is the first line and specifies that successful executions aren't logged (we really don't need or want that). Also, if we use a script with dbus call, ''run-standalone.sh'' must be in front of it. It sets up environment variables correctly for sending dbus calls as root. ''!bootrun(true)'' specifies that commands after this line are executed at next boot if system wasn't on when they should be executed. This is useful only for clearing the GPRS counter or backup scripts, for example if you switch the phone off every night the GPRS counter will still be reset every first of the month when you turn the phone on in the morning.
''!nolog(true)'' is the first line and specifies that successful executions aren't logged (we really don't need or want that). Also, if we use a script with dbus call, ''run-standalone.sh'' must be in front of it. It sets up environment variables correctly for sending dbus calls as root. ''!bootrun(true)'' specifies that commands after this line are executed at next boot if system wasn't on when they should be executed. This is useful only for clearing the GPRS counter or backup scripts, for example if you switch the phone off every night the GPRS counter will still be reset every first of the month when you turn the phone on in the morning.
 +
The first five fields are separated by a space:
The first five fields are separated by a space:
 +
'''MINUTE''' space '''HOUR''' space '''DAY_OF_MONTH''' space '''MONTH''' space '''DAY_OF_WEEK''' space '''/path/script.sh'''
'''MINUTE''' space '''HOUR''' space '''DAY_OF_MONTH''' space '''MONTH''' space '''DAY_OF_WEEK''' space '''/path/script.sh'''
 +
To interpret the two example lines: GPRS data counter is reset every 1st of the month at 00:00. Silent profile is set every Monday to Friday at 9:00. Possible values for fields are:
To interpret the two example lines: GPRS data counter is reset every 1st of the month at 00:00. Silent profile is set every Monday to Friday at 9:00. Possible values for fields are:
 +
* '''Minute''': 0-59
* '''Minute''': 0-59
Line 93: Line 102:
* '''Month''': 1-12
* '''Month''': 1-12
* '''Day of week''': 0-7 (0 and 7 are both Sunday)
* '''Day of week''': 0-7 (0 and 7 are both Sunday)
 +
Asterisk (*) means "any", or to put it differently: it means that this value does not define when the command is run.
Asterisk (*) means "any", or to put it differently: it means that this value does not define when the command is run.
 +
After saving the edited config file, fcrontab will install it automatically and it will work from that moment on. Also don't forget that commenting out lines is useful for temporarily disabling a command. Just put an # in front of the line.
After saving the edited config file, fcrontab will install it automatically and it will work from that moment on. Also don't forget that commenting out lines is useful for temporarily disabling a command. Just put an # in front of the line.
-
==Scripts==
+
=Scripts=
 +
 
 +
So we have fcron now executing scripts at defined time. But we still need to provide scripts that are executed. Here is a collection of them, but you can easily make new ones based on the example scripts here and [[Phone control]] wiki page. Don't forget to add them here though. And keep in mind that they have to be marked executable (<code>chmod +x script.sh</code>) to work. The second dbus call in some scripts is a notification and can be modified, removed or added.
-
So we have fcron now executing scripts at defined time. But we still need to provide scripts that are executed. Here is a collection of them, but you can easily make new ones based on the example scripts here and [[Phone control]] wiki page. Don't forget to add them here though. And keep in mind that they have to be marked executable (<code>chmod +x script.sh</code>) to work. The second D-Bus call in some scripts is a notification and can be modified, removed or added.
 
===Profiles===
===Profiles===
Line 273: Line 285:
The scripts used for backing up can be found on [[Manual backup and restore]] wiki page. They overlap with scripts needed here, so they should be collected there.
The scripts used for backing up can be found on [[Manual backup and restore]] wiki page. They overlap with scripts needed here, so they should be collected there.
 +
===Reboot===
===Reboot===
Line 285: Line 298:
Also remember that PIN has to be entered after a reboot. There is another way with sending reboot call via D-Bus which doesn't request to reenter PIN, but that is a forced reboot (no filesystem synchronization, etc.) and thus not the proper way of doing it.
Also remember that PIN has to be entered after a reboot. There is another way with sending reboot call via D-Bus which doesn't request to reenter PIN, but that is a forced reboot (no filesystem synchronization, etc.) and thus not the proper way of doing it.
 +
===Tweakr profiles===
===Tweakr profiles===
Line 346: Line 360:
done
done
</source>
</source>
-
Note:tested and OK on PR1.2
+
Note:tested and ok on PR1.2
-
 
+
[[Category:Software]]
[[Category:Software]]
[[Category:Power users]]
[[Category:Power users]]

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)
Retrieved from "http://wiki.maemo.org/Fcron"