[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Perl: CmdSchedule
On Fri, 26 Nov 1999, Jason Pincin wrote:
[snip]
> > - 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...
Ah, that's what I figured, but I couldn't figure out what table CommandID
was related too.
> > - 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')
> ) );
I'll put these queries in the documentation of PowerSteering.
> 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?
So basically I don't have to know/care what they're for, just that they're
arguments. Cool.
Hey you know what would be really cool? Have one or two scripts for this
scheduler to run. If you/others can write the specs for the scripts and
put them in PS, I'll write them.
Anyways, when do you need this done by?
--
Aaron Turner, Core Developer http://vodka.linuxkb.org/~aturner/
Linux Knowledge Base Organization http://linuxkb.org/
Because world domination requires quality open documentation.
aka: aturner@vicinity.com, aturner@pobox.com, ion_beam_head@ashtech.net