Script to Kill Jobs at a specific time
Updated: 23 May 2010 | 4 comments
This issue has been solved. See solution.
Hello all,
I'm working on a script via netbackup to kill jobs running after a certain time. I don't want the script to kill all jobs, though, just specific jobs/policies.
I'm not strong on the scripting, but here's what I'm running:
bpdbjobs -cancel type=backup
I don't see how I can use this script to kill a specific policy when needed.
My master server is a windows 2003 box running 6.5GA
discussion Filed Under:
Comments
Use the outpout of 'bpdbjobs' (which includes running status and policy name) to create a list of jobs that you want to kill. So if it's not the policy you're interested in, you leave it off the list.
Then feed that list of jobs to bpdbjobs -cancel.
--
Darren
A quick swim in the river of VB...
This is unsupported. Use at your own risk. I won't amend it. It's a base for you to continue with. I'm not a teacher, and I won't be holding classes in VBScript or programming for that matter.
Anyway, it's in two parts:
1) DOS that can easily be run from a scheduled task.
2) VBScript to parse the activity list and determine which jobs to cancel, and cancel them.
One that got away?
Alex, I actually took time out to write this for you.
A response would be appreciated. Rubbish? Useful?
Would you like to reply?
Login or Register to post your comment.