Cron Job and Script for price-update

Abhijit Kshirsagar abhijit86k at gmail.com
Tue Apr 1 09:02:07 EDT 2014


Hi all,
I saw the FAQ section on cron based price updates
(http://wiki.gnucash.org/wiki/Online_Quotes#cron_and_Non-X_Usage) and
wrote a small script that basically does:

- Check if LCK file exists, if it does, just exit
- set http_proxy env variable
- update prices using the env `dbus-launch ` ... command

I added this script to cron, The prices were not getting updated, so i
tried running this script when logged in through ssh - and that
worked.
I tried using just the "env 'dbus-launch ----" command (not my script)
in cron, and that didn't work either.

I no longer see the Dbus error in the cron output which is mailed to
me in /var/mail:
(GConf Error: No D-BUS daemon running)

But I do see one error:
ERROR: Undefined variable: gnc-is-debugging

So the question is - what is the difference in the cron and ssh instances?

Thanks in advance,
~Abhijit

PS: I'm running GnuCash 2.6.1 development version, compiled from
source, and Finance::Quote 1.17
PPS: I'm not using Yahoo CSV sources - i'm using JSON. Anyway the
prices are being fetched from within gnucash, so thats set up right.


More information about the gnucash-user mailing list