7 Replies Latest reply on Feb 10, 2010 10:30 AM by Drew Gainor

    Run package in server sequence

      I have a particular BLPackage that I need to execute against multiple servers, but only one at a time with a delay in between the executions. I have tried to use a batch job set in sequential mode, but the packages still seem to run all at the same time. Anyone have any other thoughts on how to do this?

        • 1. Re: Run package in true sequence
          Bill Robinson

          When you setup the batch job, are you using the targets from the deploy job or targets specified in the batch job?

           

          Which specific option in the batch job did you select?

           

          • Execute jobs sequentially—Each individual job in the Batch Job runs against all

            specified targets before moving on to the next individual job listed in the jobs list.

          • Execute jobs in parallel—All the individual jobs in the Batch Job run against all

            targets simultaneously.

          • Execute by server—All the individual jobs in the Batch Job run against each target

            sequentially but the Batch Job processes all targets in parallel. This option is

            identical to running multiple Batch Jobs simultaneously, with each Batch Job

            configured to have only one target and to execute individual jobs seq

          • 2. Re: Run package in true sequence

            I have used the targets in the batch job. There is only one job within the batch job. I have tried all three options and the start and finish times are always the same on each job.

            • 3. Re: Run package in true sequence
              Bill Robinson

              Based on the description of the options, I think you will need to create 1 job for each server.

              • 4. Re: Run package in true sequence

                I was trying to avoid creating 60 jobs.

                 

                I had thought of creating an NSH script that would loop through the servers with a sleep inbetween each one, but that is limited to the server running the script.

                 

                I thought about having an NSH script fire off a scheduled task on each of the servers, but BL runs on Windows 2003 and my servers are 2008 and the you can not do that.

                 

                I could write an external script that loops through the servers and fires off a BL job, but I have not done that before and I am not sure if I can pass a server variable to the job that way or not.

                • 5. Re: Run package in true sequence
                  Bill Robinson

                  When you say " I thought about having an NSH script fire off a scheduled task on each of the servers, but BL runs on Windows 2003 and my servers are 2008 and the you can not do that."  what do you mean?  Why can't nsh fire off a scheduled task?  It shouldn't matter what OS your servers are...

                   

                   

                  I'd look at creating an nsh script that loops though the list of target servers, sets the current server as the job target, runs the job, waits for it to finish successfully, then sets the target to the next server, executes, etc... - #3 of your options.

                   

                  You can do this w/ the blcli inside an nsh script.  It should be pretty easy.  There might be some examples of something like that on here or we can walk you through it..

                  • 6. Re: Run package in true sequence
                    Wenchi Liao

                    How much of a delay does it need? How about the blpackage with it's content, then an external command to sleep X seconds for the delay, and a regular deploy job with parallel target set to 1?

                    • 7. Re: Run package in true sequence

                      Scheduled tasks in Windows 2003 are not compatible with Scheduled tasks on a 2008 server.

                       

                      I wrote a DOS batch file and placed it on each of the servers(windows 2008). I then created a scheduled task on the servers(windows 2008). I then tried to use an NSH script on the App server(windows 2003) to run the scheduled task on the servers(windows 2008) and perform a sleep command between them. Unfortunatly, it fails because the App server is 2003. It is not possible to run a scheduled task remotely from a 2003 server. It works fine when run remotely from a 2008 or Windows 7 computer.

                       

                      cmd /c schtasks /run /tn <task_name> /s <remote_server>

                       

                      ERROR: The network path was not found.

                       

                       

                      schtasks /query /s <remote_server>

                       

                      ERROR: The network path was not found

                       

                       

                      I am not that familiar with BLCLI commands and I am unable to find much documentation as to the command reference or how to use it so if anyone thinks they have a solution and can give me a hand trying it out I would appreciate it.

                      1 of 1 people found this helpful