Modify Chapter 8

David Hampton hampton-gnucash at rainbolthampton.net
Thu Apr 13 12:16:03 EDT 2006


On Thu, 2006-04-13 at 12:32 +0900, Bengt Thuree wrote:

> Perhaps
> Adding the following line to your crontab will retrieve quotes every night
> at 02:15 local time:
> 
>    15 2 * * * gnucash --add-price-quotes <Path to data file>/<data file>
> 
> where
>   <Path to data file> could be $HOME/budget
>   <data file> could be MyBudget  (check window title in GnuCash)
> (See Chapter 2.6 and 2.8 for more information regarding GnuCash datafile.)
> 
> 
> ----
> Or is this to much?

Really a personal preference how often you pull quotes.  I don't track
day to day valuation, but like to be able to reconcile my statement at
the end of the month.

> Why every day, well, due to timezones etc, market closes on Friday
> sometime way into Saturday local time, as well as Monday closing time in
> Japan happends on Sunday late evening in US I guess.

You can tell gnucash to only pull a subset of quotes by using the
--namespace argument on the command line.  For example:

   0 0 1 * * gnucash --add-price-quotes $HOME/test_account \
             --namespace nasdaq
   0 6 1 * * gnucash --add-price-quotes $HOME/test_account \
             --namespace "^p"

This will pull quotes for the nasdaq stocks at midnight on the first day
of the month, and stocks whose namspaces begin with the letter 'p' at
6AM on the first day of the month.  The parameter after the namespace
argument is a case insensitive regular expression.  

NOTE: Each of the above cron entries is one line. They are only wrapped
here into two because of my mailer.

David






More information about the gnucash-devel mailing list