cancel
Showing results for 
Search instead for 
Did you mean: 

Chaining jobs with a delay

abelej
Level 3

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions

pkh
Moderator
Moderator
   VIP    Certified

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

View solution in original post

3 REPLIES 3

pkh
Moderator
Moderator
   VIP    Certified

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
Level 3
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
Moderator
Moderator
   VIP    Certified

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