[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CmdSchedule.pl
Bad news is that I've been sick all weekend. Good news is that I had
plenty of time to work on the script. So... here's some decisions I made,
and some questions:
1) I detect failure by the exit code or the inability to execute the
command. For now, any non-zero exit code is a failure. So besure your
scripts properly set the exit code.
2) What to do with output (STDOUT) and the exit code once I get it?
There's no place to put it in the DB. Not sure if we want a log file or
an email or something. Or just ignore the output and don't save it
anywhere. For now, output goes to the email, but this is far from perfect
since this is a forking app so lines of output from different children
may be mixed together making reading/debugging difficult.
3) There's something about forking and DB access in the same script that
causes disconnects from the DB for no apparent reason sometimes. I've got
a ugly hack in place to patch this bug... not perfect but it seems to work
well.
4) The only thing left to do is make it so that the timer works. Which
reminds me- if a timer expires before the command is done, and the app is
killed off, how should the database be updated to reflect that?
--
Aaron Turner, Core Developer http://vodka.linuxkb.org/~aturner/
Linux Knowledge Base Organization http://www.linuxkb.org/
Because world domination requires quality open documentation.
aka: aturner@vicinity.com, aturner@pobox.com, ion_beam_head@ashtech.net
The difference between `Unstable' and `Usable' is only two characters: NT