10-26-2012 02:15 AM
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:
Thanks in advance.
Kind regards.
10-28-2012 08:25 AM
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
10-28-2012 02:23 PM
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.
10-29-2012 09:14 AM
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.
10-31-2012 12:49 AM
Ok. That's not good. Where can I create a feature request?
10-31-2012 01:43 AM
You may post the idea on the following link
10-31-2012 02:52 AM
11-01-2012 12:08 AM
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.
11-09-2012 02:30 AM
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.