maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   gpe-calendar importing via cron (https://talk.maemo.org/showthread.php?t=33452)

albright 2009-10-25 14:36

gpe-calendar importing via cron
 
Hi all. I want to import my desktop
calendar (call it std.ics) to my n810
automatically via a cronjob.

No problem getting the calendar to the
n810.

But although this command works from
the terminal:

gpe-calendar -c "My Calendar" -i std.ics

it won't work from cron.

My cron line is this:

30 10 * * * /usr/bin/gpe-calendar -c "My Calendar" -i std.ics

It also fails if I call a script in cron

No errors are reported and cron reports that the
job has run ...

I'd really prefer not to have to manually import.

Any advice appreciated. TIA

Graham Cobb 2009-10-25 16:22

Re: gpe-calendar importing via cron
 
I haven't tried this. However it might be that cron is not setting up the environment (DBUS, etc) that gpe-calendar expects. You could try using run-standalone.sh to run it. I.e.

Code:

30 10 * * * /usr/bin/run-standalone.sh /usr/bin/gpe-calendar -c "My Calendar" -i std.ics
If that doesn't work, create a short shell script to run gpe-calendar and redirect standard output and standard error to a file in the /tmp directory so you can see if it is producing any errors. For example:

Code:

#!/bin/sh
/usr/bin/gpe-calendar -c "My Calendar" -i std.ics >/tmp/gpe-calendar.log 2>&1

Graham

albright 2009-10-25 17:04

Re: gpe-calendar importing via cron
 
that run-standalone thing did the trick!

many thanks - it's really nice to have my
calendar automatically synced every
morning


All times are GMT. The time now is 22:48.

vBulletin® Version 3.8.8