- Best iPhone, iPad Business Apps for 2014
- 14 Tech Conventions You Should Attend in 2014
- 10 Desktop Apps to Power Your Windows PC
- How to Add New Job Skills Without Going Back to School
Network World - Repetitious work is aggravating. If you ever have to do something such as transfer files on a regular basis from a Windows server to another server using FTP, you most likely will have come to grips with scripting FTP sessions. Here's one we threw together to send the report from our weather station connected to our internal Windows 2000 Server to our external Web server:
We use this with the command "ftp -s:e:\ftpscript.txt." Great! But the weather station updates the report every 5 minutes. We could leave a batch script looping - pretty much guaranteed to barf within a few hours - or use the Windows Task Scheduler, which only allows a minimum repeat interval of 24 hours (unless you want to schedule multiple jobs), but the chances of trying to transfer a locked file (resulting in another barf) are high.
We needed a better way. Our ideal solution was to trigger the FTP job by the weather station report being updated. We found our solution in the shape of OpalisRobot from Opalis Software.
OpalisRobot is awesome. It consists of a server component and a client component - the latter can run on any machine, including the one hosting the server.
Using the client, you graphically construct a process flow by dragging "objects" from a palette into a workspace and linking them. The starting point can be a scheduled trigger or an event.
So we dragged a Monitor File Event icon from the File Management objects group into our workspace. We filled in the file- name and location attributes, and specified the event to watch for was the file changing (we also could trigger on file deletion, access, attribute change, etc.).
Next we dragged over a Run Program Task object and filled in the details of the program to run and the arguments to use. Once objects are configured in the workspace, they can be linked by clicking and dragging from one object to another.
It works great! Every time there's a file update the FTP utility kicks in and transfers the report to our Web server. Perfect! Then we thought: Let's test to see if we can ping our Web server (our DSL connection has become flaky and dies regularly, taking out our DSL modem and router.
We added an Internet Application Status object and set it to ping our server, and rearranged the links to connect the Monitor File Event object to the Internet Application Status object and connected that, in turn, to the Run Program Task object and a new Send E-mail object.
Next we specified the rules that determine the conditions for triggering the Run Program Task and Send E-mail objects. The rules were based on the success or failure of the ping - success triggered the FTP job, while failure sent an e-mail message.
OpalisRobot has a feature called Dynamic Data that provides access to data in objects that can be used in text messages or arguments to other objects. We used the stop time from the Internet Application Status object in the Send E-mail object to report when the ping had failed. OpalisRobot also includes static variables that cover user-defined variables (useful for address lists, for example) and system variables (Computer Name, SysDir, etc.).