Automating Windows
I have a great job (read: limited hours, excellent pay) but one of things I like least about it are the repetitive IT tasks I have to do. Things are stable enough that a full sysadmin would be a waste of money, but still, certain things have to get done. For a long time I have used Remember the Milk, an excellent free service that reminds me as needed for repetitive tasks like cleaning out log files, checking disk space, changing passwords — good for personal items, too — but I still have to do the tasks. My dream has been to find a way where I can automate them. UNIX of course would offer this capability, though not always in the most user-friendly way.
Today I was confronted with a situation where a task we have been doing weekly now needs to be done daily. I didn’t feel like the hassle of writing code, or doing it manually every day myself. Because the task is done on our production server, this is not something our customer service department can do. It involves running a database procedure and e-mailing the date-stamped file to a mailing house.
A friend of mine had mentioned a program that allowed you to write macros in Windows. I wanted to find something slightly more robust but with the same idea of scripting a sequence of events. And, without having to write any scripts. After hunting around I found a program called WinAutomation. This has a nice little GUI where you can drag and drop actions like “Send E-mail” and “Delete Files” into your job. It has flow control and limited but serviceable error handling.
I was able to learn the program and write my mailer job in a few hours. The hard part, as with many programs, was thinking through and handling each possible error. I was so thrilled by this that I decided to tackle another tedious job, deleting Tomcat log files. Some of these roll over each day, while others are date-stamped with the time the server started but can’t be deleted — so for those, the newest version needs to be left alone. Strangely enough this job was harder to write than the first one, but eventually I got that done too.
I’m very happy and looking forward to writing more jobs. The price is pretty reasonable too — $129 for the standard program, or $199 to include the compiler feature which allows you to turn a job into an executable that will run on computers without WinAutomation. As with most of these things, you can get a free Window scripting alternative. But it doesn’t have a GUI, and if I’m going to learn a new language, I might as well code it the old way.
WinAutomation apparently has been offering bloggers free licenses to review the product. Alas, I am not in that category :). Just thought it was a neat product.