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

Re: Perl: CmdSchedule



> > "NotificationAddresses", and will either be NULL/'', or contain a list of
> > email addresses seperated by semi-colons.  If it contains information, an
> Can we make that commas?  That way I won't have to do any conversion.  

Sure.

> > email to a specified email address, which will be a list, such as
> > KBCmdErrors@linuxkb.org or whatever... just lemme know and I'll set it up.
> Yeah, set it up please.

OK.

> > If you have any other thoughts, questions or comments before you start,
> > you knw how to reach me.  :)  
> Let's see:
> - Status doesn't have a "completed" flag.  Hence I assume completed jobs
> are deleted.

Correct.

> - What's the difference between CmdID and CommandID ?

CmdID is unique within the CmdSchedule Table.  CommandID is unique within the ExternalCommands Table.  ExternalCommands consists
of a list of commands allowed to be run as external commands by your script.  This relates to your next question...

> - Am I blind, but what is the field that stores the command to be run?

I gave you the query once, lemme dig it up again... :)

select CmdID, CmdType, CommandPath, TargetObjects, Attempts, NotificationAddresses from
CmdSchedule,
ExternalCommands where CmdSchedule.CommandID = ExternalCommands.CommandID
and (Status != 'Disabled' and Status !='Failed' and Status != 'Running')
and ( (CmdType = 'Immediate' OR Status = 'PendingRetry') OR ( (Hour = '*'
OR Hour = 'this hour') AND
(Minute = '*' OR Minute = 'this minute') AND (WeekDay = '*' OR WeekDay =
'this day of week') AND (MonthDay = '*' OR MonthDay = 'this dat of month')
) );

Run this and you'll see how it retuirns stuff.  It will return the script to be run as CommandPath.

> - What's TargetObjects?

This a list of comma seperated integers.  You will pass these as parameters into the script provided in CommandPath.  If
TargetObjects contains "4,9,15,32" and CommandPath = "../cgi-bin/rmobject.pl" you would execute sumthin like:

"../cgi-bin/rmobject.pl 4 9 15 32"

Any more thoughts/questions?


-- 
Jason
http://vodka.linuxkb.org/~chardros