6 Replies Latest reply on Mar 22, 2013 5:07 PM by Siddu angadi

    executing the cmd file from BladeLogic job

      Hi,

       

      Can anyone help me in how to execute the cmd file from Bladelogic?

       

      Thanks a million for help.

       

      Thanks,

      Srini

        • 1. Re: executing the cmd file from BladeLogic job
          Aryan Anantwar

          Hi Srini,

           

          You want to execute .bat file.

           

          So, This can be done in following way from Bladelogic:

           

          1. Create an Empty BLPackage.
          2. Add the .bat file to BLPackage by using the option Import Asset.
          3. Change the value of the Path property of the .bat file in BLPackage (i.e. c:\Temp\abc.bat)
          4. Add an External command to BLPackage
          5. Assign some name to command (.bat execute command)
          6. Type command as:  cmd.exe /c c:\Temp\abc.bat or just use c:\Temp.bat (i.e. the abc.bat file get executed)
          7. Add another one External command to BLPackage
          8. Assign some name to command (to remove the .bat file)
          9. Type command as:  cmd.exe /c del c:\Temp\abc.bat or just use del c:\Temp.bat
          10. create Deploy Job for the BLPackage & Test it.

           

          Update me, Is it helpful or not?

           

           

           

          Regards,

          Aryan Anantwar

          • 2. Re: executing the cmd file from BladeLogic job

            Hi,

             

            I am trying to stop the nodes servers in under weblogic.

            Job result showing successfull but nodes are not stopping. FInd attached screen

             

            StopNodesIssue.png

            Please advice.

             

            Thanks,

            Srini

            • 3. Re: executing the cmd file from BladeLogic job
              Barry McQuillan

              Hi Srini,

               

              Have you tried executing this manually from an NSH prompt?

              You could try looking in the RSCD Agents Transaction logs for more information.

               

              Failing that you could put additional debugging into your script you identify what PATH it is referring to.

               

              Regards

               

              Barry

              • 4. Re: executing the cmd file from BladeLogic job

                HI Barry,

                 

                I am using the external comand method not NSH script. Please advice.

                 

                will find any more info using NSH prompt as I am using exernal command method,

                 

                Thanks,

                Srini

                • 5. Re: executing the cmd file from BladeLogic job
                  Barry McQuillan

                  Hi srini,

                   

                  What do the RSCD transaction logs say?

                  Do they have more info?

                   

                  Does your command rely on environment variables? If so set them in the external command and see if they still error.

                   

                  You need to identify exactly which path it is failing to find.

                  Another option would be to add 'exit 1' to force an error in job and set job to leave stging files in place. You could then go and run the package manually to identify issue on target.

                   

                  Sent from my Blackberry

                  • 6. Re: executing the cmd file from BladeLogic job
                    Siddu angadi

                    Hi Srini,

                     

                    What would be result when you execute manually on Windows box?

                     

                    Also make sure set profile when invoking any environment variable. Bladelogic does not understand the user profile, it will run as RSCDAccount with previlige mapping to Admin account provided you have not used automation principle.

                     

                    Thanks

                    Siddu