Forum Discussion

abelej's avatar
abelej
Level 3
12 years ago

Chaining jobs with a delay

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.

 

  • 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-bemcmd-start-jobs

3 Replies

  • 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
  • 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.
  • 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-bemcmd-start-jobs