Re: Hobbyist License problems (was: Re: llcense problems)
From: Charlie Hammond (hammond_at_not@peek.ssr.hp.com)
Date: 01/29/04
- Previous message: Hoff Hoffman: "Re: Hobbyist License problems (was: Re: llcense problems)"
- In reply to: Hoff Hoffman: "Re: Hobbyist License problems (was: Re: llcense problems)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Jan 2004 15:40:09 GMT
No support. No guarantee. But, if you're inerested, here is how
I warn myself about soon-to-expire licenses:
$ SET VERIFY
$!
$! LIC_CHECK.COM
$!
$! Check for soon-to-terminate licenses
$!
$! Resubmit job
$!
$! We will not run this on Sat or Sun.
$!
$! If this is FRIDAY , re-submit it for next MONDAY
$!
$ if f$cvtime("TODAY",,"WEEKDAY") .eqs. "Friday"
$ then ! On Friday, "TOMORROW+2-" is next Monday
$ after_time = f$cvtime("TOMORROW+2-","ABSOLUTE")
$ else
$ after_time = f$cvtime("TOMORROW","ABSOLUTE")
$ endif
$!
$ set noon
$ submit lic_check.com /name=lic_check /after="''after_time'"
$ stat = $status
$ set on
$ if .not. $status
$ then
$ mail blank.txt _hammond -
/subj="LIC_CHECK failed to re-submit itself -- continuing"
$ endif
$!
$! On Monday check for anything w/i 30 days.
$ if f$cvtime("TODAY",,"WEEKDAY") .eqs. "Monday"
$ then
$ pipe sho lic | sear sys$input terminate
$ if $status .eq. %X10000001 ! normal -- found terminate
$ then
$ mail blank.txt _hammond -
/subj="1 or more licenses will terminate within 30 days"
$ exit
$ else
$ if $status .ne. %X18D78053 ! No strings matched
$ then
$! Anything other than normal and no strigs matched is unexpected.
$ mail blank.txt _hammond -
/subj="Unexpected status in LIC-CHECK.COM(30)"
$ exit
$ endif
$ endif
$!
$! Other days, check only for w/i 10 days
$ else
$ x$d = f$cvtime("today+10-","absolute")
$ x$d = f$element(0," ",x$d)
$ pipe sho lic /before /termination='x$d' | sear sys$input criteria
$ if $status .eq. %X18D78053 ! No strings matched -- terminate
$ then
$ mail blank.txt _hammond -
/subj="1 or more licenses will terminate within 10 days"
$ exit
$ else
$ if $status .ne. %X10000001 ! normal -- found
$ then
$! Anything other than normal and no strigs matched is unexpected.
$ mail blank.txt _hammond -
/subj="Unexpected status in LIC-CHECK.COM(10)"
$ exit
$ endif
$ endif
$ endif
--
Charlie Hammond -- Hewlett-Packard Company -- Ft Lauderdale FL USA
(hammond@not@peek.ssr.hp.com -- remove "@not" when replying)
All opinions expressed are my own and not necessarily my employer's.
- Previous message: Hoff Hoffman: "Re: Hobbyist License problems (was: Re: llcense problems)"
- In reply to: Hoff Hoffman: "Re: Hobbyist License problems (was: Re: llcense problems)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|