pan-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pan-devel] Re: [Pan-users] Update on cron-friendly Pan


From: Carl Wilhelm Soderstrom
Subject: [Pan-devel] Re: [Pan-users] Update on cron-friendly Pan
Date: Mon, 4 Nov 2002 13:56:50 -0600
User-agent: Mutt/1.2.5i

On Mon, Nov 04, 2002 at 10:24:15AM -0800, Charles Kerr wrote:
> I did a little exploratory hacking last night on making Pan cron'able.
> It looks like we've done a good job of decoupling Pan's backend and GUI:
> in 15 minutes I was able to get a gui-free version Pan start up and process
> tasks.xml. :)

        cool! you rock!
        I ought to put some beer money in the tip jar, since I'm not likely
to have the chance to buy you one in person. :)

> So, where do we want to go with this?
> 
> * If the goal is to just have Pan run tasks silently and exit,
>   then all that remains is to convince Pan to exit when the queue
>   is empty in console mode.

        this is a very good option, no matter what.
        you should probably have it check for other versions of pan running
with the same UID (and exit gracefully when that happens), in case:
        - the user has a GUI session running
        - the user screwed up the crontab entry and is running it every 4
          minutes, instead of every 4 hours. :) (been there, done that).
        OTOH; I usually leave my copy of pan running on my desktop until it
crashes; so it would be nice to do like what Mozilla/Galeon does; and if you
try to start a session while one is already running, just attach to the
existing session and (in mozilla's case) open a new window. in pan's case,
we could have the cron'ed process send a signal to the running process, to
start up a scripted download session, if one isn't running already.
 
> * Having the status messages from the bottom of the main window
>   (showing percentages of a task completed, for example), a la wget,
>   is also do'able, but more work and maybe not desirable in cron.

        not useful in cron; but useful from the console, if you're a
complete console freak. I probably wouldn't use it much, if at all.

> * A middle-ground approach that I like, which gives user feedback
>   but also plays well in a cron environment, would be to have Pan
>   write all the log messages (ie, everything the GUI puts in the
>   log window) into a log file ($PAN_HOME/log.txt?).

the way I'd keep logs would be to just set the MAILTO="address@hidden"
environment variable in my crontab, and see the output of it in my mailbox,
as soon as the job's done.
that's probably not the thing for everyone tho. ;)

logfiles are always good, no matter what you're doing. please make one. :)


Carl Soderstrom.
-- 
Systems Administrator
Real-Time Enterprises
www.real-time.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]