cancel
Showing results for 
Search instead for 
Did you mean: 

What happened to stop time in the scheduler?

ZacTech
Level 4

I would like to make an incremental step in an exchange or SQL backup for tran logs every hour between 7am and 7pm.  Since there is not stop time on the hour recurrence am I really going to have to make 12 incremental steps for each hour and then 12 duplicate to estat steps?   

1 ACCEPTED SOLUTION

Accepted Solutions

pkh
Moderator
Moderator
   VIP    Certified

You can use the Windows Scheduler to schedule the BEMCLI cmdlets, 

Suspend-BEJob - to suspend your incremental jobs at 7 p.m.

and

Resume-BEJob - to resume your incremental jobs at 7 a.m.

View solution in original post

11 REPLIES 11

ZacTech
Level 4

Well scratch that idea. I can't even scroll in the edit backup up windows and the duplicates do not all you to collapse.   Love being a beta tester. 

 

Best part was the video of the guy stating that their migration proccess was given ALOT of focus so there should be no problems upgrading.  

ZacTech
Level 4

I knew I saw a scroll bar at somepoint so I kept playing with it. You only get a scroll bar if you edit an individual job, not multiple jobs.   .......................Wow, alot of work to do. 

Chase_Drouillar
Level 4

Well, I'm certainly not a professional when it comes to the use of BEMCLI, but if I understand it correctly, it's possible to execute BEMCLI commands via pre/post-commands and the windows scheduler. Given that BEMCLI can create new backup jobs, and, I would assume, delete backup jobs, it may be possible to do something like this:

Have your incremental job run from 7am to 7pm, only having it backup on its initial run.

Give that incremental job a pre command that will create an additional incremental stage that will run every hour, starting at 8am that day.

Use the windows scheduler to execute a BEMCLI code that will then delete the created incremental job at 7pm.

 

Now again, I'm not sure how viable of a solution this really is, as I don't really have very much experience at all with BEMCLI, but the thought just occured ot me and I figured I'd share it, in case it can be helpful. You'd likely need someone with a decent amount of knowledge of BEMCLI to do it, and it'd take some effort, but once you got it down, it seems like it'd be much easier this way than creating an army of stages for every job.

 

pkh talks about some of the functionality of BEMCLI here.

 

EDIT: Another option could also be to simply have it run the hours with the option checked to "Cancel the job if it is still running after <12> hours", though this would be a very haphazard way of doing the backup, which would throw an error of cancellation for the last backup every time, and could be potentially probelmatic. For the duplicates, you could have them run every hour with a cancellation after, say, 13 hours (or cut the incremental back 11 and do 12 for duplicate), having the duplicate start at 7:40pm (or however long it takes for you to be certain that the incremental will run successfully). Again, though, this method sounds like it could easily cause issues, but who knows, maybe it would work.

 

EDIT2: I'm also guessing that with enough knowledge of using commands, it would likely be possible to have a pre-command in an hourly incremental/duplicate that would stop the job after 12 hours in a more graceful manner.

pkh
Moderator
Moderator
   VIP    Certified

You can use the Windows Scheduler to schedule the BEMCLI cmdlets, 

Suspend-BEJob - to suspend your incremental jobs at 7 p.m.

and

Resume-BEJob - to resume your incremental jobs at 7 a.m.

ZacTech
Level 4

Thanks pkh, its starting to sound like I need to fully embrace BEMCLI.  

ZacTech
Level 4

Ok, I tried this, and after the Suspend every servers backup job disappeared.  I ran it again but with resume, and only the one job I had in quotes came back?   Whats going on?

ZacTech
Level 4

Ran Get-BEJob and it looks like every single job is set to IsActive: False

This was the exact command I ran that caused this:

Suspend-BEJob -i "Servername-Backup 000047-incremental" -confirm:$false

 

Please help

ZacTech
Level 4

I ended up having to restore the BEDB database to get all my jobs back.  I tried resume-bejob with every job that showed up in Get-bejob with no luck.  

ZacTech
Level 4

If there is a way to fix the jobs in the original database that would be great, because it looks like I have lost alot of work I have done this afternoon.  

ZacTech
Level 4

Update, it looks like they are there becuase I can see them when I select duplicate a job.  I can't view any job unless its actively running.  Its like they have all been hidden.  They don't even show on the backup calendar and when I open it, Unavle to retrieve the requested schedule Unknown reson: 0x00000103 appears. 

ZacTech
Level 4

If I select the server, click edit backups, then click ok, the backup jobs show up.  This is NOT working for all servers however as they are getting errors of Object reference not set to an instance of an object.  This is a mess.