Why not just use task scheduler to schedule the script? There is a lot written on the subject as well as a couple of schedule task UDFs.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.