I cannot find a way to query the enabled/disabled status of a tape job via PowerShell.
Neither .IsScheduleEnabled nor .CanRunByScheduler() seem to be available.
Is this not supported? Maybe there is an "indirect" way to retrieve this information for tape jobs?
Also, the success/failure status doesn't seem to be available inside post-job scripts - the returned tape job status is apparently still in state "working".
I'd like the post-job script to determine whether tapes should be exported at the end of a successful (monthly) tape run, as a convenience for the tape operators.
Is there an alternative way to retrieve success/failure status inside a PowerShell script that runs as a post-job script of a tape job?
Thanks.
-
- Novice
- Posts: 5
- Liked: never
- Joined: Nov 24, 2010 9:07 am
- Contact:
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: PowerShell automation for tape jobs: how to detect job enabled/disabled and success/failure status?
Have you tried to query:
- NextRun parameter (disabled jobs must have some common date there; like 1900 or something)
- LastResult parameter; should have information regarding the latest job result
More information about the mentioned parameters can be found here.
Thanks.
- NextRun parameter (disabled jobs must have some common date there; like 1900 or something)
- LastResult parameter; should have information regarding the latest job result
More information about the mentioned parameters can be found here.
Thanks.
-
- Novice
- Posts: 5
- Liked: never
- Joined: Nov 24, 2010 9:07 am
- Contact:
Re: PowerShell automation for tape jobs: how to detect job enabled/disabled and success/failure status?
Unfortunately, LastResult is still "None" during post-job execution, and "NextRun" is empty (probably because the tape job is executed as part of a job chain).
Who is online
Users browsing this forum: Semrush [Bot] and 16 guests