I'm trying to schedule a tape library inventory to run prior to my weekly tape backup. I've done this via the pre-job script funcitonality.
Problem is, while I know how to make powershell wait for the inventory before closing, I don't know how to get the batch file to respect that powershell is still running...
I guess I haven't tried it with spaces + quotes, but I'd think it would work just fine, but I usually just stick my scripts in C:\Scripts to keep the path short and provide a standard location.
Worst case you should be able to edit the batch to use start like:
Can you elaborate on what exactly didn't work as expected? The script didn't get executed? Did it fail with some message? Did work incorrectly? Or something else? Thanks.
1. Tape backup starts,
2. Pre-job script is marked as successful (almost immediately)
3. Inventory doesn't start (even though it does when I run the script manually).
4. Tape job continues without inventory having run.
What I want to happen is...
1. Tape Job starts
2. Pre-job script starts - tape job waits for the task to complete
3. Inventory job starts (triggered by pre-job script).
4. Inventory completes and tape job continues.
I wonder if the entire path to powershell.exe is needed. One doesn't when running tasks from the scheduler - the search path must include that folder. Guess there's one way to find out