Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Chaining jobs with a delay

Created: 23 Mar 2013 • Updated: 09 May 2013 | 3 comments
This issue has been solved. See solution.

pkh,

I really like your solution on chaining. 

I have a similar need but would also like to introduce a 10 minute delay in between 2 jobs.

For example job1 runs, then would like 10 minute delay for cleanup actions to complete, then run job2 in that order.

Any suggestions?  Your command sequentially starts next chained job within seconds of the first completing.

 

Comments 3 CommentsJump to latest comment

pkh's picture

To introduce a delay, you got to use the Start-sleep cmdlet to introduce a 10 minutes delay.  Your script would go something like this.

 

Start-BEJob -In "Job1" -Confirm:$False | Wait-BEJob
Start-sleep -s 600
Start-BEJob -In "Job2" -Confirm:$False | Wait-BEJob
Start-sleep -s 600
Start-BEJob -In "Job3" -Confirm:$False | Wait-BEJob
Start-sleep -s 600
Start-BEJob -In "Job4" -Confirm:$False | Wait-BEJob
abelej's picture

Does BackupExec 2010 R3 support these powershell modules? I tried this using a batch job and using timeout.exe and I can't seem to get the delay part to work. The next job just runs immediately after the first job completes, without the delay.

pkh's picture

No.  BEMCLI comes with BE 2012.  BE 2010 uses BEMCMD which is not based on Powershell.  If you want to chain jobs with BE 2010, see my blog

https://www-secure.symantec.com/connect/blogs/use-...

SOLUTION