Does --add-price-quotes also get currencies ?

AmigaPhil AmigaPhil at ping.be
Thu May 7 21:12:58 EDT 2009


Geert Janssens wrote:

> Although your issue is not with cron's e-mail capabilities, this paragraph
> suggests that all cron scripts are executed under the locale that was
> active when crond started.
> 
> You may be able to fix this by setting the proper LC_* environment
> variable at the beginning of your script. From your e-mail address,
> I assume you live in Belgium (as I do !)

Yes, in Charleroi.  ;-)


> so your locale is 'be'. Start your crontab with LC_ALL=be
> If all goes well, the gnucash command you execute in your crontab should
> pick this up and run with the proper locale.

Interesting...

I've just tried this from console:

[code]
> env LC_MONETARY="fr_FR.UTF-8" gnucash --add-price-quotes $HOME/Documents/GNUCash/MonPortefeuille
gnc.bin-Message: main: binreloc relocation support was disabled at configure time.

Found Finance::Quote version 1.15
[/code]

Then checked in GnuCash... :  Quote for currency > USD-EUR was updated !  :great:
So it seems that 'forcing' LC_MONETARY env variable does the workaround.  :good:

Thanks for the clue !

So now, I'm going to set the crontab to:
20 22 * * 1-5 env LC_MONETARY="fr_FR.UTF-8" gnucash --add-price-quotes Documents/GNUCash/MonPortefeuille >/dev/null 2>&1 #JOB_ID_1


I don't know who is in charge to update the docs, but I suggest to add
this tip to either the Concepts Guide and the Help Guide, or somewhere
in the FAQ.



AmigaPhil



More information about the gnucash-user mailing list