Tasks runing by scheduler donot run correctly RRS feed

  • Question

  • Hi All,

    I have 2 tasks in Windows Script (VB Language 32bit compiled script) which usually took lesst than few seconds to run. What they do is that they read an external encryption key from an external file, then encrypt database data by the key and send them through another server by ftp. I had these 2 tasks scheduled daily on Windows server 2003 and had no problem with their running for years. The problem happened when I transferred both to a new Windows 2008 Server (64 bits). These tasks do not run correctly and their execution takes hours(they do not stop by themselves). I have set scheduler terminate both tasks after 1 hours of running, however the result is the same; they run but do not do the ftp and the rest; I get an error message (runtime error  2147217871 (80040e31) Query Timeout expired) which means that there is a timeout blocking either for ftp or database process that makes script continue running forever. But when I run them directly by dbl-Click, there is no such an issues or error message. Unfortunately scripts are compiled to EXE and are too old with no source files are available for them.

    The problem is because of scheduler. But, if I run them with scheduler, above scenario repeats. Server is almost non-stop running with Administrators password and both tasks are scheduled to run with highest privileges.

    Anybody has any clues for what I must change or verify to make Scheduler work? I assume there must be a security issue involved?!?

    All Directories and files containing encryption keys used by thease two tasks are not read only; all users (system, applications,etc)  have all permissions (except especial permissions) on them.

     Thanks in advanced

    Friday, May 27, 2011 5:43 PM


  •  Ridiculous!  The old application was aa windows script and used   Scripting Shell  (CreateObject("Wscript.Shell")) which was using missing windows lpr.exe file. 2008 server does not have this command exe in path. I copied this file and its dll from old server System32 and put in new server’s SysWOW64 folder. Problem seems to be solved so far. I found my answer while I wanted to rewrite the old script at: http://social.technet.microsoft.com/Forums/en/ITCG/thread/11158bec-6047-4f3a-9f83-847c51a8c6ae

     hope it helps. If you have the same issue after server upgrade, you better check the PATH on both OSs. Maybe files exist.

    • Marked as answer by A.Oveissian Friday, June 3, 2011 8:35 PM
    Friday, June 3, 2011 8:34 PM