maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   MfE - initiate sync from command line (https://talk.maemo.org/showthread.php?t=41502)

rcs1000 2010-01-20 10:50

MfE - initiate sync from command line
 
Hi,

Does anyone know how I can trigger a manual MfE sync from the command line? I'd like to have a script that (a) initiates a VPN connection, (b) syncs MfE, and then (c) disconnects the VPN connection.

Cheers

Robert

qwerty12 2010-01-20 11:10

Re: MfE - initiate sync from command line
 
dbus-send --print-reply --type=method_call --session --dest=com.nokia.asdbus /com/nokia/asdbus com.nokia.asdbus.fullSync

fullSync can be:
fullSync
sync
syncEmail
stopSync

CharlesM 2010-03-15 21:00

Re: MfE - initiate sync from command line
 
im getting

Failed to open connection to "session" message bus: (null)

do i have to customise this command in anyway?

CharlesM 2010-03-16 02:30

Re: MfE - initiate sync from command line
 
apols i think i just needed to sleep on it

CharlesM 2010-03-16 09:49

Re: MfE - initiate sync from command line
 
actually in addition to the sleep is the odity that vpnc needs to be run as root while the mfe sync needs to be run as user! just looking for the right combination of setuid for this to work perfectly!

todor_tsankov 2010-04-16 12:17

Re: MfE - initiate sync from command line
 
Quote:

Originally Posted by qwerty12 (Post 483953)
dbus-send --print-reply --type=method_call --session --dest=com.nokia.asdbus /com/nokia/asdbus com.nokia.asdbus.fullSync

fullSync can be:
fullSync
sync
syncEmail
stopSync

Works like a charm. I was just poking my head of a way to keep my calendar synced and not being forced to stay online all the time through WIFI/GPRS. This manual sync invoking (scheduled every hour) with combination with autodisconnect seems to be the perfect fit for me :D

jsomby 2010-04-16 13:18

Re: MfE - initiate sync from command line
 
Quote:

Originally Posted by todor_tsankov (Post 613386)
Works like a charm. I was just poking my head of a way to keep my calendar synced and not being forced to stay online all the time through WIFI/GPRS. This manual sync invoking (scheduled every hour) with combination with autodisconnect seems to be the perfect fit for me :D

Would you be so kind to share that script with us who cannot make such scripts by itself? :)

ffarber 2010-04-16 16:14

Re: MfE - initiate sync from command line
 
Quote:

Originally Posted by qwerty12 (Post 483953)
dbus-send --print-reply --type=method_call --session --dest=com.nokia.asdbus /com/nokia/asdbus com.nokia.asdbus.fullSync

fullSync can be:
fullSync
sync
syncEmail
stopSync

This is great, coupled with alarmed, I now have much better control of mfe syncing schedules.
Fred
P.S. (edited in) I had to use very primitive cron strings in Alarmed as it does not seem that the #/# or #-# formats for cron are supported by the N900. I had to spell out every five minute interval I wanted to synch mfe along with every hour separated by commas, oh well, it works. Did I Miss something?

CharlesM 2010-05-27 13:51

Re: MfE - initiate sync from command line
 
Is there a way to check if the sync has completed. . .

based on network connection and sync size this could take a while and I really wanted to check if it has completed!

also is there a way to check if a current network connection is established?

cheers

mail2vrp 2010-07-02 21:13

Re: MfE - initiate sync from command line
 
i would like to know what the difference between using
  1. fullSync
  2. sync
  3. syncEmail
  4. stopSync
can someone plz explain??

mail2vrp 2010-07-06 21:47

Re: MfE - initiate sync from command line
 
Quote:

Originally Posted by mail2vrp (Post 739013)
i would like to know what the difference between using
  1. fullSync
  2. sync
  3. syncEmail
  4. stopSync
can someone plz explain??

anyone?? just wanted to make sure that i am using the right option in my script..


All times are GMT. The time now is 07:14.

vBulletin® Version 3.8.8