We have moved to a new Sailfish OS Forum. Please start new discussions there.

Trigger CalDAV sync from command line? [answered]

asked 2014-07-09 19:30:36 +0200

lechris gravatar image

updated 2014-07-09 19:31:40 +0200

According to https://together.jolla.com/question/45519/caldav-manual-syncing-is-it-working/ and https://together.jolla.com/question/45288/sync-from-pulley-menu-in-caldav-account-does-not-work/ there seems to be an issue with syncing CalDAV account with Is there a way to trigger syncing a CalDAV account from the command line?

I'd like to watch the journal while playing around with syncing calendars. It seems to me that my CalDAV accound gets synced from time to time. But I can't figure out in which intervals. It does not seem to happen at the set up quarter hour interval. Events created or moved on the phone did not appear online before the next day. A newly calendar created and shared at the server did not show up until now.

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by eric
close date 2014-07-10 11:11:09.443901

1 Answer

Sort by » oldest newest most voted

answered 2014-07-09 21:56:59 +0200

Fuzzillogic gravatar image

Based on the N9/Buteo, you can try this, as normal user (nemo):

dbus-send --session --print-reply --dest=com.meego.msyncd /synchronizer com.meego.msyncd.startSync string:'caldav-sync'

I don't use CalDAV but SyncML, so I can't be certain this is will actually work for CalDAV. It should respond with "boolean true" if successful, otherwise you'll get "boolean false".

edit flag offensive delete publish link more


I tried this command earlier today and it doesn't seem to work. You get true response, but server log shows no requests.

koudi ( 2014-07-09 23:18:06 +0200 )edit

@Fuzzillogic Thank you very much for this starting point! Invoking the command above leads to [C] CalDavClient::initConfig:287 - no account id specified, "accountid" not found in profile and [C] NotebookSyncAgent::fetchRemoteChanges:221 - void NotebookSyncAgent::fetchRemoteChanges(const QDateTime&, const QDateTime&)which in turn let me stumble over https://github.com/nemomobile/buteo-sync-plugin-caldav which I did not know before.

lechris ( 2014-07-10 02:22:18 +0200 )edit

The "caldav-sync" profile is the "template" profile. Per-account profiles are generated from this template profile. So, what you need to do is trigger the per-account profile which was generated for your caldav account. This will be something like "caldav-sync-6" or "caldav-sync-19" or something depending on the account Id of your caldav account. You can do devel-su -p ls -al /home/nemo/.cache/msyncd/sync/ to find out which sync profiles are currently installed.

chris.adams ( 2014-07-10 04:13:37 +0200 )edit

@chris.adams is right, this is working. Thank you.

koudi ( 2014-07-10 08:57:44 +0200 )edit

@chris.adams Thank you! I recreated the CalDAV account meanwhile and put the whole URL in the server field (this time?) as suggested by https://together.jolla.com/question/45179/caldav-owncloud/?answer=45186#post-id-45186. The manual synchronization with the actual account number suffix updated entries in both directions.

lechris ( 2014-07-12 01:40:26 +0200 )edit

Question tools



Asked: 2014-07-09 19:30:36 +0200

Seen: 676 times

Last updated: Jul 09 '14