How to set up a 24x7 (non-stop) operation:
Top  Previous  Next

Q: How can I set up a 24 hours a day, 7 days a week (non-stop) operation with iOpus iMacros? .

A: Many applications of iOpus iMacros require continuous operation of the software. Examples are the use of IIM as part of payment gateway, extracting large volumes of information or web testing applications in general.

Problem:
iMacros has the ability the remotely control the web browser and a wide variety of third-party browser plug-ins, such as Java virtual machine (Java applets), Adobe Acrobat Reader (PDF viewer), Macromedia Shockwave (Flash applets) and many others. By design most of these controls are not intended for 7x24 operations and running them repeatedly for a several days can lead to undesirable effects, such as increased memory consumption ("memory leaks").

Solution:
The Scripting Interface is a compact and reliable component that controls the iMacros browser and, thus, all its plug-ins. The Scripting Interface was designed to automate web testing and at the same time to compensate problems of the Windows Internet components used by the iMacros browser and third-party browser plug-ins.

7x24
Picture 1: Stable CPU and memory usage over time running the sample code listed below in part (b) with the "Demo-Flash" macro. The left part is a task manager snapshot taken on day 1 and the right part is taken on day 30. The snapshots were taken on a Windows Server 2003 with 2 GHz CPU and 512 MB Ram.

Machine Restart
A periodic restart is not required. However, as with server application in general, you should make sure that the application restarts correctly after the machine is rebooted or reset.

If you design an application for 7x24 operations we recommend the following

Use the Scripting Interface instead of the Play (Loop) Button
If you need to repeat a certain macro for example five million times, do not start a single browser instance and use the repeat button. Instead use the Scripting Interface for the loop. In VBS code
this looks like:

Set iim1= CreateObject ("InternetMacros.iim")
For m = 1 to 5000000
   iret = iim1.iimInit()
   iret = iim1.iimPlay("macro1")
   iret = iim1.iimExit()
Next

This command sequence closes the browser after each macro and thus avoids browser memory leaks. Even if the browser or one of its plug-ins "hangs" or"crashes", the Scripting Interface is not influenced by this and will open a fresh browser instance and continue to work. However, closing and re-opening the browser (as the above example does) takes a few seconds on an average PC. So if processing speed is important for your application, you can split this task in two loops, and use iimExit only, for example, every 1000th loop to save time.

Set iim1= CreateObject ("InternetMacros.iim")
For m = 1 to 5000
   iret = iim1.iimInit()
   For n = 1 to 1000
      iret = iim1.iimPlay ("macro1")
   Next

   iret = iim1.iimExit()
Next




Page URL http://www.iopus.com/imacros/help/faq_24x7.htm