George Sinclair wrote:
> This is a simple question but maybe not an easy answer.
No, it is a very easy answer.
>
> How can I obtain the time a given group last ran? I'd like to determine
> this to be used by a script that will run each day.
>
> Obviously, there's a start time for the group, and that time is usually
> set in the NSR group resource, but it could change. In my case, the
> savegrp command will be launched from a cron job, so, yes, a specific
> time must be provided, but again, that could change, and I don't want to
> have to hard code it in my script. Moreover, the last time the cron job
> launched it, maybe it didn't run properly, maybe the client was down, or
> the network was down, or whatever, so I can't trust that the last time
> the group ran was, say, yesterday at that same time.
>
> Looking at the savetime for the last save set using something like:
>
> mminfo -s server -q 'group=groupname,savetime>one week ago' -ot -r
> savetime | tail -1
It's not in the media database, but it is in the resource database, thus
can be queried using nsradmin.
echo " show last start
print type: NSR group;
name: yourgroupname" | nsradmin -i -
To sign off this list, send email to listserv AT listserv.temple DOT edu and
type "signoff networker" in the body of the email. Please write to
networker-request AT listserv.temple DOT edu if you have any problems with this
list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER
|