Sunday, August 2, 2009

Scheduled Tasks on HA Pairs in Windows

Sometimes you might find yourself deciding that a Scheduled task is required for some report or file transfer on a production system. The production system, however, is part of a high availability (HA) pair. The particular method of dealing with HA in this particular ( hypothetical of course ) case works by moving an IP Address called a Virtual IP address between the servers of the HA Pair. Whichever server holds the VIP is the current node.

Your application needs to know if it is executing on the current node before starting.

Wrap your application in a very simple snippet of Comand Line script that:
  1. Looks for the VIP in ipconfig.
  2. If no errors found then jump to the section of your script that launches your application or another script to do the task.
  3. If an error is found then jump to the section of your script that notifies the log.

@echo off

ipconfig /all | find %VIPTHATWORKS%

REM #We are here becuase the find returned a result.
REM #It is safe to execute the rest of the application.
echo "VIP Found. - Continuing with application..."

REM #Pause for user input.

REM #This part of the script is where you would handle any
REM #error logging or other admin related
echo "Could not find a VIP. - Exiting"

REM #Pause for user input.

echo "end of script reached."

Saturday, August 1, 2009

Things to do with an iPod

I have had my iPod 8gb Nano ( Video ) for about 4 months now and I have been having heaps of fun with it. I know it's not cool like an iPod Touch or iPhone but it is still plenty powerful.

I have tried using it with Linux and although it is supported in Amarok ( I am still on Amarok 1.4 due to lack of Fedora packages for the new version which actually has replay-gain for Xine included ) I have found that the support for pod casts is a little limited. For example: I like to download all the pod casts in a feed at once so that I can catch up to the current feed. So I stick with iTunes. This means sticking with a windows pc or if you are lucky to own one, a mac.

Initially I spent heaps of time building the perfect play list on my iTunes and moving that over to the iPod. This was fun but only for a short while. The main problem being that no matter how many weeks of music you have on your iPod, you still end up with the feeling that you have heard it all before.

I was struck by the "Only options is to rebuild windows" bug recently. You might know that as the, "My Computer is getting slower and slower and doesn't shut down properly anymore" bug. Stupidly, I had no backup of my iTunes library so I lost the whole thing. About 200 CDs worth. Nice...

What was initially looking like a bad thing for me has really turned into a blessing in disguise. A friend suggested I try an audio book and pointed me to Its a great resource for free audio books, usually read by the Author. If you sign up you can subscribe to audio books which are exposed via an XML feed which is completely compatible with iTunes. Just select how you want the feed to be released to you: once a day, once every 3 days etc. and then select the Subscribe Via iTunes button. If the book is complete, ie: All episodes are available, then you can click the release all episodes now button and then subscribe to the feed provided. All episodes will be loaded into your iTunes library ready for you to click the "Get All" button.

All in all I seriously recommend Podiobooks. I suggest you start off with, "Infected" by Scott Sigler. Its a dark / fantasy kind of book with horror content but a riveting story. I was hooked within 5 minutes and found myself looking forward to my next bus trip to work so I could find out more about Perry Dawcey's plight...

Happy listening.