Video Screencast Help
Give us your opinion and win with Symantec! Please help us by taking this survey to tell us about your experience with Symantec Connect, so that we can continue to grow and improve.  Take the survey.

BackupExec 2012 BemCLI - Get "Job Cancellation option" status

Created: 26 Oct 2012 • Updated: 31 Oct 2012 | 8 comments

Hello everybody, 

I'm actually writing a monitoring script for Backup Exec 2012 and I stuck with the problem that I can't find an option in BEMCLI to get the setting value of the job option "Cancel the job if it is still running * hour after its scheduled start time". 

This setting can be found in the GUI under Backup and Restore -> right click on the Server -> Edit Backups -> at the right-hand side "Backup" select Edit -> Schedule -> option Recurrence -> toggle the plan options -> in the fieldset "Options" there can be found the checkbox for the option mentioned above. 

I also attached to this post a screenshot for better explaination. 

I already tried to get the setting value with the following commands but couldn't find them: 

  • Get-BEJob -Name "%BACKUPNAME%" | select *
  • Get-BEBackupDefinition -Name "%BACKUPNAME%" | select *

Thanks in advance. 

Kind regards.

Comments 8 CommentsJump to latest comment

pkh's picture

You should use that setting in the job option as it is much easier to implement.

The other way is to do this. Create a script which is run as a pre-command.  This script will do the following

1) sleep for 1 hour

2) get-bejob -status active | stop-bejob $confirm:true

lufist's picture

Thank you for your response. But that is not what i want to do. I just want to read out with BEMCLI the status of this flag (if it is set or not). I do not want to make any changes to the job or its execution. And i have to use Powershell/BEMCLI because i want to integrate this feature in my monitoring script.

Regards. 

pkh's picture

BEMCLI is not meant as a full replacement for the GUI so there are somethings you cannot do with BEMCLI and this is one of them.

lufist's picture

Ok. That's not good. Where can I create a feature request? 

nimesh_momaya's picture

You can try this command with Backup Exe 2012 with latest hotfix installed

$job = Get-BEBackupDefinition "JobName"

$job.InitialFullBackup.CancelJobIfRunningAfterScheduledTimeBy

After executing above commands you will get require details, please let me know if it works.

lufist's picture

Yeah that worked!

But I did it another way. In my script always work with the BEJob-Object which I get from Get-BEJob. In this object I can also get the infos you mentioned.

E.g.: 

$job = Get-BEJob "JobName"
$job.BackupDefinition.InitialFullBackup.CancelJobIfRunningAfterScheduledTimeBy

Regards.