­­mrc Documentation
michaels, ross & cole, ltd.
http://www.mrc-productivity.com/

 

 

Run Summaries from Batch

 

Summary templates allow you to summarize data into new physical tables. However, to summarize this data, the Summary application must be run. Like most users, you probably don’t want to come into the office in the middle of the night to execute your summary applications from the URL Browser. Instead, we offer you the ability to run your summary applications via a Batch process. If you have taken an update on or after April 7th, 2008, you have the ability to run your Web 2.0 Summaries from a batch process. To implement this technology, please do the following:

 

Build/Compile your Web 2.0 Summary application.

 

Move to the server that is hosting these applications and run your Web 2.0 Summary.

 

The Prompt Page of the Summary. Click the “Run Summary” button to generate your summary.

 

And the confirmation page…

 

After confirming that the data is correct, you will copy the entire URL from the browser. In my case, the URL would be:

http://localhost:8011/mrcjava/servlet/HURCKES.S00070s

 

This URL will be used for my batch process.

 

Next, click the Start button -> then select “Run.” Type “cmd” Press OK.

 

Your screen will look like this:

 

Run a “cd\” command, to navigate back to the C:

Next, run a “cd m-power” command.

 

 

To initiate the Summary, simply type the following

 

mrcsum http://www.mrc-productivity.com:8011/mrcjava/servlet/HURCKES.S00070s?run”=2”

 

Press “Enter”

 

Notes: the ?run”=2” is necessary as it is telling your batch process to skip the prompt page and go directly to the output screen.

            If you wish to pass certain parameters to your application, the syntax is the same as with reports:

            R001 – 1st prompted record selection

            R002 – 2nd prompted record selection

            Etc…

 

When the summary runs successfully, the output will look like this:

 

 

Copy and paste the entire input you used to call your application and open up notepad (Start -> run -> type “notepad” -> Click OK).

 

Paste in your input.

 

Click File -> Save as…

Navigate to the c:\m-power folder, and name your file firstbatch.bat

(Note, you must name your create your file with a .bat extension).

 

Now that we have a .bat file, we can use this with your Windows Scheduler (i.e. “Scheduled Tasks”).

 

Open “Scheduled Tasks” by clicking Start -> Programs -> Accessories -> System Tools -> Scheduled Tasks

 

Double click the “Add Scheduled Task.” Click “Next” Click Browse and select the .bat file we made in the above step.

 

Name the Task, and specify when it should run. Click “Next”. Specify any other specifics and click “Next”

 

Lastly, enter in the username, and password needed for this server. This information is needed by Windows to run your application in batch.

Click Finish.

 

Your summary will now run at the specified time. You can make sure all is working correctly by right clicking on your new job, and specify “Run.”