Automatic price quotes & PostgreSQL backend

David dgpickett at aol.com
Wed Nov 6 10:39:35 EST 2013


OK, I added "pkill 'gnucash$';sleep 5" to my script, but still no prices.  I get this:

 


 gnc.bin-Message: main: binreloc relocation support was disabled at configure time.

Found Finance::Quote version 1.17



 

-----Original Message-----
From: Geert Janssens <janssens-geert at telenet.be>
To: gnucash-user <gnucash-user at gnucash.org>
Cc: David <dgpickett at aol.com>; maf <maf at chilwell.net>
Sent: Wed, Oct 30, 2013 5:48 pm
Subject: Re: Automatic price quotes & PostgreSQL backend



On Wednesday 30 October 2013 16:11:00 David wrote:
> I tried the script and cron, needed the dbus fix, but it does not seem
> to do anything for my Ubuntu XML version unless I kill GnuCash first.
>  (Hard to tell, regardless, as it suppresses identical prices but
> keeps different ones even though it does not seem to time stamp them
> is a visible way.)  I suspect while running it ignores the XML files
> once loaded in and rewrites them on exit.
> 
> Maybe it works better with SQL versions.  I could not find a way to
> run with SQL under Ubuntu.
> 
As Derek pointed out: you can't open your data file twice at the same time. If GnuCash is still open, you can't have a cron job trying to open it as well.
 
The cron job suggestion won't work if you wish to keep gnucash open all the time.
 
Geert
> 
> -----Original Message-----
> From: Maf. King <maf at chilwell.net>
> To: gnucash-user <gnucash-user at gnucash.org>
> Cc: David <dgpickett at aol.com>
> Sent: Tue, Oct 29, 2013 7:08 pm
> Subject: Re: Automatic price quotes & PostgreSQL backend
> 
> On Tue 29 October 13 09:20:16 David wrote:
> >  Checking out http://wiki.gnucash.org/wiki/Online_quote
> > 
> > I see:
> >  Warning About Open Files
> > 
> > Updating quotes will modify the GNUCash file/database. As multi-user
> > access is not supported (as of 2.4), the file/database should be
> > closed prior to updating quotes.
> > 
> > 
> > so it seems a bit hazardous.
> 
> Hi,
> 
> I'm not a developer, but I've done a bit of cron-job script hacking
> over the years, and I'd have thought that a crude check for a running
> gnucash process and aborting the update if one is detected would be a
> sufficient safety net, possibly with a warning email that the daily
> update has been skipped...
> 
> 0.02
> Maf.
> 
> > -----Original Message-----
> > From: David <dgpickett at aol.com>
> > To: sunfish62 <sunfish62 at yahoo.com>; warlord <warlord at MIT.EDU>
> > Cc: gnucash-user <gnucash-user at gnucash.org>
> > Sent: Tue, Oct 29, 2013 9:13 am
> > Subject: Re: Automatic price quotes & PostgreSQL backend
> > 
> > 
> > I need to figure out how to call it for xml files.
> > 
> > Is there an option for scheduled transactions?
> > 
> > 
> > -----Original Message-----
> > From: David T. <sunfish62 at yahoo.com>
> > To: David <dgpickett at aol.com>; warlord <warlord at MIT.EDU>
> > Cc: gnucash-user <gnucash-user at gnucash.org>
> > Sent: Mon, Oct 28, 2013 5:34 pm
> > Subject: Re: Automatic price quotes & PostgreSQL backend
> > 
> > 
> > 
> > A workaround I used for a while was to create a simple shell script
> > that invoked GnuCash with the "--add-price-quotes" option on my
> > data file. I then was able to run this script whenever and however
> > I wanted (for example, as a cron job at a certain time every day).
> > 
> > 
> > 
> > David
> > 
> >    From: David <dgpickett at aol.com>
> >  
> >  To: warlord at MIT.EDU
> > 
> > Cc: gnucash-user at gnucash.org
> > 
> >  Sent: Monday, October 28, 2013 10:48 AM
> >  Subject: Re: Automatic price quotes & PostgreSQL backend
> > 
> > These daemon sort of functions have traditionally been implemented
> > either 1) as a second app that runs as a daemon and has these
> > limited functions, or 2) as an option telling it to be a daemon
> > (like sendmail -bd) with a second copy running, or 3) as a thread
> > or periodic task in the single application.> 
> >  The latter options keeps all code in one app, but the first two
> >  need to> 
> > tolerate multiple users on the files or data storage.
> > 
> > Does the GNUCash xml storage have a RDBMS/SQL layer over it?  The
> > xml
> > storage might not be as amenable to second users as the SQL
> > versions, but regardless, you have to be doing things that do not
> > open the possibility of either app. overlaying the other's changes.
> >  Prices are probably easier to do than scheduled transactions, as
> > price tables are not in continuous use, and that mostly read only,
> > but account registers are.  Doing it all in one app left running
> > solves some of the conflict and concurrency issues.
> > 
> > Getting the daemon/startup launch varies by O/S.  It could be under
> > cron or the Windows Task Scheduler, or could run continuously like
> > so many pesky processes in windows, e.g., real_something.exe
> > checking for updates to the realplayer.  In X, it could run
> > windowless until a user logs on and runs a second copy, which tells
> > the first what the DISPLAY is that it needs to add windows to.  It
> > might even learn to close all windows when dismissed, but keep
> > running.
> > 
> >  Not hearing from Anthony, the original poster, so has anyone done
> >  any
> > 
> > scheduled prices or transactions any way?
> > 
> > 
> > 
> > 
> > -----Original Message-----
> > From: Derek Atkins <warlord at MIT.EDU>
> > To: DGPickett <dgpickett at aol.com>
> > Cc: gnucash-user <gnucash-user at gnucash.org>
> > Sent: Mon, Oct 28, 2013 11:27 am
> > Subject: Re: Automatic price quotes & PostgreSQL backend
> > 
> > DGPickett <dgpickett at aol.com> writes:
> > > Good Idea!  Did you have an success?
> > > 
> > > I wish GNUCash would just get the prices every day at a given
> > > time, if left
> > > running, or have something cron-like to keep it in sync.
> > 
> > Great idea!   Looking forward to your patch to implement it!
> > 
> > > They could do the same for generated transactions, every day just
> > > after midnight.  Maybe part of GNUCash could be a daemon/service
> > > to take care of such.  The storage media should not make a
> > > difference.  For xml, they can put a rdbms-like daemon over the
> > > files so they can have multiple updating clients.
> > > 
> > > 
> > > 
> > > Please remember to CC this list on all your replies.
> > > You can do this by using Reply-To-List or Reply-All.
> > 
> > -derek
 



More information about the gnucash-user mailing list