On Nov 8, 12:55 pm, Mohit Sindhwani <mo_m... / onghu.com> wrote: > bdezo... / wisc.edu wrote: > > Okay, here is a test script/cmd combo that runs from the command line > > but not from a Scheduled Task under Windows. It results in an error > > code of one. > > > ##### blunk.cmd file > > > c: > > cd \scripts > > c:\ruby\bin\ruby.exe c:\scripts\blunk.rb > > > # I have tried using the env variable idea earlier with no different > > outcome > > > ##### blunk.rb file > > > PATCHFILE = "c:/scripts/patchDayNotice" # also without absolute path > > tried and failed > > > File.open(PATCHFILE,"a") do | file | > > file.print("BLUNK called\n") > > print "BLUNK called\n" > > end > > > Any help anyone can give would be great. Is the error return code of > > one from Ruby? What error is that? I can't find any info on that. > > OK! I just tried the cmd/ rb that you sent me. Yes, it works fine from > the command line. I also set it up as a 1-time task in Windows > scheduler [you'll understand why I didn't set it to be something that > runs only on bootup] and it just ran from Windows scheduler. It seems > to work fine for me. It appends to the file. > > I did not set any advanced properties in Windows scheduler. > > Now, I'm lost as to what may be causing the problem for you. > > Cheers, > Mohit. > 11/9/2007 | 2:55 AM. I moved it to a different machine and it launched! Thanks Mohit!!!