4 Replies Latest reply: May 15, 2014 10:14 AM by elginreigner _ RSS

    V10.5 Command Line Issues

    ButterflyEffect _

      Hello,

       

      I am just starting to use BAT file command line procedures to automate, and I cannot for the life of me to get my code to work.

       

      I have searched previous forums, and tried to cross reference online, but still nothing successful. If there is anyone who can point out any obvious mistakes and get this to work, you are my hero. The monarch project opens, however the saved export does not run.

       

      "C:\AH Scheduler Test\EHIN\EHIN.xprj" /px:"C:\AH Scheduler Test\EHIN\EHIN\Export1"

       

      Thanks all!

        • V10.5 Command Line Issues
          Olly Bond

          Hello butterflyeffect,

           

          You're almost there. Your batch file needs to do three things - tell Windows to run Monarch, tell Monarch what project to open, and specify what export to perform. Something like this:

           

          "c:\program files\monarch\program\monarch.exe" "c:\files\project.xprj" /pxall[/CODE]

           

          ...should do the trick. Please visit www.********************[/url], download the free batch file generator, and buy Kruncher's book.

           

          Best wishes,

           

          Olly

            • V10.5 Command Line Issues
              ButterflyEffect _

              Thank you so much Olly! It worked perfectly. If I want to do multiple saved exports for other projects, I assume I just repeat the project and export command lines for every other individual project I want to run?

               

              Thanks again, much appreciated.

               

              P.S. I went to that link and there was nothing available...

                • V10.5 Command Line Issues
                  Olly Bond

                  Hello butterflyeffect,

                   

                  Yup, that's it. The biggest danger you might face with lots of projects in a batch is timing, if one project depends on the output of another. If you want to automate Monarch in a secure, scalable, and licensed way, use Monarch DataPump.

                   

                  Thanks for the pointer about Kruncher's site - I'll let him know.

                   

                  Best wishes,

                   

                  Olly

              • V10.5 Command Line Issues
                elginreigner _

                 

                "C:\AH Scheduler Test\EHIN\EHIN.xprj" /px:"C:\AH Scheduler Test\EHIN\EHIN\Export1"

                 

                /QUOTE

                 

                Good start, but a few details missing/incorrect. As Olly stated, dont forget the call to Monarch program itself. When specifying specific exports, the PX: is correct but you need the export name. Ex: /PX:Export1 or to export all , /PXALL. Standard format will be just as Olly as posted in his code section.

                 

                I use the command line heavily, if you have more questions, I would be more than glad to assist.

                 

                Your command line should look like this:

                "c:\program files\monarch\program\monarch.exe" "C:\AH Scheduler Test\EHIN\EHIN.xprj" /px:Export1 /CODE

                 

                This assumes standard install location on a 32 bit system.