I've got a problem at work that's I've been avoiding since not a 100% perl problem but after reading Empowered by Perl I was rejuvenated and I feel empowered enough to tackle it again!
We've got several pieces of equipment that we need to monitor the health of. Now, in the past this has just been done by calling the 'fix-it' guy as soon as it breaks. I did a little snooping and found a option to print a pretty detailed report containing a bunch of values that we might be interested in monitoring. It's even in a nice form that would be cake to parse with perl. I contacted the software company to see if they had an API that I could directly query to get that information out or a command line switch to generate that report to STDOUT, only to be disappointed. I get the feeling that when they were developing the software, they didn't foresee any single company owning as many of these as we do so I can't say that I blame them.
Ideally, I'd like to set up a 'cron' job (of course these all run on Windows so I'm not sure that's trivial) to generate that report in plain text and save it somewhere on the network, then I can get another perl script to parse them and add them to a sqlite database.
So I seek your wisdom regarding the following problems:
- How could I set up a perl program (or another program) to act as a printer so I can get the output in plain text? (Essentially a 'print to file' workaround since there's no other output for that report besides printing it.)
- How can I run that command (which, as far as I know, needs to be selected from the GUI's menu) in this program at scheduled intervals?
Thanks in advance for your insights, any thoughts on another approach would be greatly appreciated!