[EMAIL PROTECTED] writes:
> But that's only part of the point. There are also some
> 'stand-alone' perl scripts that scan a gnucash data file, find
> anything that's a stock finds the right website, grabs the current
> price, and puts that price into the data file. There are multiple
> (unrelated) issues here:
>
> 1) the code is just big enough that redoing in scheme seems like a waste
> of time ...
Well, we can leave the SWIG stuff the way it is, but I might be
willing to translate the stuff. I'm fluent in both languages. Which
files is it?
> 2) these 'stand-alone' scripts are not currently invokable from a
> gnucash menu entry; they must be run from the command line. ...
This would be trivial to add now to the silly "Extensions" menu. (The
menu works, but it's a "proof-of-concept" thing. We need to figure
out how we really want menus handled and do that next...
> 3) these scripts typically would get scheduled from a cron job.
> Great answer for unix gurus, but a problem for newbies.
This suggests that sticking them on the menu is only part of the
problem. Though once they're schemified, invoking them from a command
line (minus locking/synchronization issues) just involves adding an
arg like perl's "-e" to the startup process. It's critical to make
sure that it gets invoked at the right time (after initialization),
though.
I still want to do a more automated automated task system, but I've
put that on the back burner. I want gnucash to be able to schedule
events that are guaranteed to happen, even if you don't have gnucash
running, and I want it to be able to do this itself, without having to
ask the user to modify their crontab, etc. by hand. Unless we're
going to get in the business of editing the user's crontab
automatically, something I'd vhemently oppose, we need either a
modification to cron, or an "at" with a few guarantees.
I got in a long discussion with the at/cron/anacron maintainers and
other developers about this a while back and they weren't at all
excited about any modifications to support my ideas. I can't really
blame them, but to do things "right" using cron (IMO), I felt one
viable solution would be a slight modification to cron which would
allow a user to have multiple "tagged" cron files. This would allow
gnucash to maintain it's own crontab (it would be the user's gnucash
tagged crontab -- i.e. you could say "crontab -e --section gnucash",
or whatever). Debian already has all the code to do this in our cron
daemon because we support multiple system level crontabs (This makes
it so that our packages no longer have to ever touch the system level
crontab to install tasks -- basically our cron uses the filesystem as
the "cron database". I think this may be upstream now too.):
/etc/cron.d
/etc/cron.d/postgresql
/etc/cron.d/exim
/etc/cron.d/anacron
...
/etc/cron.daily/find
/etc/cron.daily/netbase
/etc/cron.daily/standard
/etc/cron.daily/man-db
/etc/cron.daily/mgetty
...
/etc/cron.monthly/standard
/etc/cron.monthly/wu-ftpd
...
/etc/cron.weekly/sysklogd
/etc/cron.weekly/man-db
/etc/cron.weekly/cvs
etc.
I figured that I could also get the behavior I wanted out of GnuCash
(with less weirdness) by using "at", as long as at supports some
minimal semantics. (mostly that it runs missed jobs on system
restart). Someone thought that at would do this, but I didn't have
time to investigate further.
I still don't really like the idea of gnucash's scheduling tasks
showing up in the user's normal at list, especially since the normal
at list doesn't really show you much at all about what's there (jobs
should have optional description lines IMO), but I don't see any easy
way around it other than having gnucash have it's own system level
daemon that essentially duplicates at's job. That idea both offends
my sense of modularity, and puts us in the position of adding another
hassle to the install, something I have little interest in doing.
--
Rob Browning <[EMAIL PROTECTED]> PGP=E80E0D04F521A094 532B97F5D64E3930
----- %< -------------------------------------------- >% ------
The GnuCash / X-Accountant Mailing List
To unsubscribe, send mail to [EMAIL PROTECTED] and
put "unsubscribe gnucash-devel [EMAIL PROTECTED]" in the body