![]() |
2010-02-03
, 22:29
|
Posts: 24 |
Thanked: 8 times |
Joined on Dec 2009
|
#22
|
cd /home/user
mkdir Scripts
cd Scripts
create a file named "profile_general.sh", containing:
#!/bin/sh
dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"general"
and "profile_silent.sh", containing
#!/bin/sh
dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"silent"
cd /home/user/MyDocs/.documents
wget https://repo.codemages.net/opt/fcron..._armel_opt.deb --no-check-certificate
dpkg -i fcron_3.0.1-2_armel_opt.deb
sudo gainroot
I haven't tested it, but I think you can create a fcron user with:
useradd fcron
if that doesn't work, then install adduser:
apt-get install adduser --allow-unauthenticated
adduser fcron
setup fcrontab:
chown fcron:fcron /etc/fcron.*
chown -R fcron:fcron /var/spool/fcron
EDIT --- editing rcS-late is generally a bad idea and should be avoided. The script will break across upgrades, for instance. See instead the setup of the startup script here: http://wiki.maemo.org/Fcron#Installation
if you still want to edit /etc/event.d/rcS-late, after "initctl emit MOUNTS_OK", add:
/etc/init.d/fcron start
--- from here on everything should be ok.
and now, the cron jobs:
export EDITOR=vim
fcrontab -e
i have entered the following jobs:
0 8 * * 1-5 run-standalone.sh /home/user/Scripts/profile_general.sh
0 9 * * 1-5 run-standalone.sh /home/user/Scripts/profile_silent.sh
30 12 * * 1-5 run-standalone.sh /home/user/Scripts/profile_general.sh
30 13 * * 1-5 run-standalone.sh /home/user/Scripts/profile_silent.sh
0 18 * * 1-5 run-standalone.sh /home/user/Scripts/profile_general.sh
59 23 * * 0-4 run-standalone.sh /home/user/Scripts/profile_silent.sh
0 11 * * 6,0 run-standalone.sh /home/user/Scripts/profile_general.sh
0 2 * * 6,0 run-standalone.sh /home/user/Scripts/profile_silent.sh
back to the shell, type:
/etc/init.d/fcron start
![]() |
2010-02-03
, 23:05
|
Posts: 398 |
Thanked: 301 times |
Joined on Sep 2007
@ Texas
|
#23
|
![]() |
2010-02-03
, 23:12
|
Posts: 313 |
Thanked: 247 times |
Joined on Jan 2010
@ USA
|
#24
|
![]() |
2010-02-04
, 07:20
|
Posts: 8 |
Thanked: 3 times |
Joined on Nov 2009
@ Finland
|
#25
|
There is already an app for this - http://maemo.org/packages/view/ses/
![]() |
2010-02-04
, 09:09
|
Posts: 156 |
Thanked: 90 times |
Joined on Jan 2010
|
#26
|
![]() |
2010-02-06
, 09:31
|
Posts: 23 |
Thanked: 8 times |
Joined on Nov 2009
|
#27
|
![]() |
2010-02-07
, 18:25
|
Posts: 156 |
Thanked: 90 times |
Joined on Jan 2010
|
#28
|
![]() |
2010-02-07
, 19:12
|
Posts: 543 |
Thanked: 181 times |
Joined on Aug 2009
@ Universe,LocalCluster.MilkyWay.Sol.Earth.Europe.Slovenia.Ljubljana
|
#29
|
![]() |
Tags |
automation, crontab, request |
|
something that triggers due to 'actual activity' i'e Bluetooth found, wifi detected etc etc would ensure you could be flexible with your time.
*subscribed*
My N900 Photo Gallery and Slideshow