cancel
Showing results for 
Search instead for 
Did you mean: 

Stop backup jobs if run after a specified time ?

Puffy
Level 6

Hi,

 

Wondering whether is there a way to cancel a job if it runs too long automatically.

 

Thanks.

 

 

4 REPLIES 4

Omar_Villa
Level 6
Employee
You can change your client read timeout, media mount time out, media read timeout, any of this can cancel a job, but it will fail with a different error based on the timeout.

Puffy
Level 6

Hmm...I was thinking maybe there is a command to do that like

 

mybpclient -policy <name> -hoursago 10 -canceljob

 

Just a thought :p 

Doug_Austin1
Level 3
This can be done via a cron job that kicks off a script to look for jobs running after X time

Stumpr2
Level 6

hello Puffy,

you can use the command bpdbjobs to look for an active job

you can use the command bpdbjobs to cancel an active job

 

# bpdbjobs -help
bpdbjobs: [ -report ] [ -M <master servers> ] [ -ignore_parent_jobs]
        [ -vault | -lvault | -all_columns | -most_columns | -gdm ]
        [ -file <pathname> ] [ -append ] [ -noheader ] [ -mastertime ]
        [ -jobid <job1,job2,...jobn> ]
bpdbjobs: -summary [ -M <master servers> ] [ -ignore_parent_jobs]
        [ -U | -L | -all_columns ]
        [ -file <pathname> ] [ -append ]
bpdbjobs: -resume | -suspend | -delete | -cancel | -restart
        <job1,job2,...jobn> | type=<jobtype> | type=all
        [ -M <master servers> ] [ -quiet ]
bpdbjobs: -cancel_all [ -M <master servers> ]
bpdbjobs: -clean [ -M <master servers> ]
        [ -keep_hours <hours> ] or [ -keep_days <days> ]
        [ -keep_successful_hours <hours> ] or [ -keep_successful_days <days> ]
bpdbjobs: -change_priority_by [ -M <master servers> ] -priority <number>
        -jobid <job1,job2,...jobn>
bpdbjobs: -set_priority [ -M <master servers> ] -priority <number>
        -jobid <job1,job2,...jobn>
bpdbjobs: -version
bpdbjobs: -help