Hi,
I've written a vbscript that gets the output from available_media.cmd, then uses some string manipulation to report on how many full tapes are in the library for particular pools. An email is then sent to the relevant site requesting tapes to be rotated based on this information. I hope this is not too confusing! The relevant part of the vbscript that runs the available_media command shown below.
Set objShell = CreateObject("WScript.Shell")
Set objScriptExec = objShell.Exec("available_media.cmd")
strPools = UCase(objScriptExec.StdOut.ReadAll)
The important point is this: When I run the script from normal command prompt it runs fine, but when attempting from scheduled task it doesn't run available_media.cmd. The string is always returned as null. I've tried some inventive ways to attempt to workaround this, like attempting to run available_media.cmd from a batch file that outputs to a text file (idea being the script can then read from this text fil). Unfortunately the same thing occurs, it runs fine when just running the .bat file but not when it is scheduled. eg.
cmd /c "available_media.cmd >d:\scripts\maintenance\test\file.txt",1,True
So on to my question(s).
1. Is there a way to run the available_media cmd from scheduled task?
2. If answer to above is no, is there another netbackup command that will output the volume pools with the status of the included tapes?
I've tried to run 'bpmedialist -p volume_pool' but get an error: Could not obtain report from host XYZ, database system error
Any help or ideas on this much appreciated!
Thanks
Mic