开发者

cron + evolution data server + msync returning libebook-WARNING

Ok, i got a working synchronisation between mobile and evolution using opensync and the lib-evo2 module.

issueing

msynctool --sync w880i --filter-objtype note --filter-objtype event --filter-objtype todo --conflict n

directly works fine, in a script like this:

#!/bin/bash
eval `dbus-launch --sh-syntax`
export DBUS_SESSION_BUS_ADDRESS
export DBUS_SESSION_BUS_PID
msynctool --sync w880i --filter-objtype note --filter-objtype event --filter-objtype todo --conflict n
exit 0

it does aswell.

But pu开发者_JS百科tting it in a crontab, this error pops up:

(process:18902): libebook-WARNING **: e_book_construct: Could not obtain a handle to the Personal Addressbook Server with IID `OAFIID:GNOME_Evolution_Exchange_Connector_BookFactory:1.2'

how do i solve this?

[edit]my crontab entry looks something like this:

@daily /usr/local/bin/w880i-sync.sh

with being the script mentioned earlier. [/edit]


I guess it's a problem of missing environment variables. When started with cron, you won't have the same environment as if you log in.

From the man page of crontab (5):

Environment variables can be set in the crontab. In BSD or ATT, the environment handed to child processes is basically the one from /etc/rc.

So, check your environment and add needed settings into your script.


In a script to be run by cron it's always a good idea to include the full path to any executables (i.e. dbus-launch and msynctool).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜