Task Scheduler Not Operating Correctly


  1. Posts : 7
    Win 7 64 bit
       #1

    Task Scheduler Not Operating Correctly


    I have several custom .vbs scripts kicked off in Windows 7 Task Scheduler. They perform ftp operations that back up our online database files. Obviously this is critical to our operations.

    When I run the .vbs tasks manually they run fine. The files are downloaded as they should be. I can't get the scheduled tasks to run. I have checked all items that made sense and they just don't get kicked off. I just now enabled task history (found out how to do that in another sevenforums post, thanks) for all tasks so I don't know what was reported by the OS when they were supposed to be kicked off.

    I just changed the trigger time of one of the tasks so I can see it run and see the history. All indications are that it started and ran fine (task started, action started, task completed, action completed). The files weren't FTP'ed into the local folder though. It looks as if Windows started and finished the task but the .vbs file didn't actually execute.

    When I run the .vbs file manually by double clicking it the script runs fine and the files are FTP'ed as they should be.

    Not only is this critical for our operation but out clients. I am backing up their files also.

    I have to say that in previous versions of Windows Scheduled Tasks was never as complicated, and it always just worked.

    Can someone provide some insight into what is up (or down) with Windows 7 Scheduled Tasks? Thanks for the help.
      My Computer


  2. Posts : 1,403
    Win 7 Ultimate 32bit
       #2

    Please post all parameters exactly as you have them in the task that is not running.
    Maybe the syntax of the command you are trying to run is not correct.
      My Computer


  3. Posts : 7
    Win 7 64 bit
    Thread Starter
       #3

    Hi Tepid,
    Thanks for the reply.

    I took screenshots of all of the Task Settings dialogs and attached them.

    The task apparently was successfully run from the perspective of the OS but the files in that were supposed to be FTP'ed by running the .vbs file weren't FTP'ed.

    Thanks for the help.
    Attached Thumbnails Attached Thumbnails Task Scheduler Not Operating Correctly-general-task-settings.png   Task Scheduler Not Operating Correctly-triggers-task-settings.png   Task Scheduler Not Operating Correctly-action-task-settings.png   Task Scheduler Not Operating Correctly-conditions-task-settings.png   Task Scheduler Not Operating Correctly-settings-task-settings.png  

    Task Scheduler Not Operating Correctly-history-task-settings.png  
      My Computer


  4. Posts : 7
    Win 7 64 bit
    Thread Starter
       #4

    created bat file to run the .vbs files


    Here's what I tried next based on some Google research ideas. I created a .bat file with this code:

    @echo off
    echo %date% %time% %username% > c:\test.txt

    start D:\apps2\ftp-vbs\FTP21stWPDbBackupsCode.vbs 1>>c:\test.txt 2>>&1
    echo %date% %time% >> c:\test.txt

    I ran it as an administrator and this was the results in the c:\test.txt file:
    Fri 02/26/2010 5:07:11.10 Artie
    Fri 02/26/2010 5:07:11.16

    The files still weren't ftp'ed.

    I also tried these lines with the same results, no files FTP'ed:
    wscript D:\apps2\ftp-vbs\FTP21stWPDbBackupsCode.vbs 1>>c:\test.txt 2>>&1
    cscript D:\apps2\ftp-vbs\FTP21stWPDbBackupsCode.vbs 1>>c:\test.txt 2>>&1

    When I tried to set the default for the .bat file to run as an administrator the option was disabled.

    I also looked into powershell scripts, but not sure I want to go down that path. It seems that I'd be able to do what I need here using vbscripts and maybe batch files..
    Last edited by RockyMtnHi; 26 Feb 2010 at 16:01.
      My Computer


  5. Posts : 1,403
    Win 7 Ultimate 32bit
       #5

    well,, found this,, not sure if you saw this or not,.,..

    http://forums.techarena.in/windows-s...lp/1143091.htm

    I might setup a simple test vbs file to see if the VBS is even getting called when run from a Task. It may not be, and just not giving any indication that it ran or not.

    use wscript as that will pop a window with a message.

    If that does run,, then maybe a permissions issue within the code when trying to FTP?
    Not creating the connection over FTP during the task run?
    I am just guessing.

    I am not a scripting guru, but know very little.
    If it runs fine when you run it by double click, then something that needs rights, isn't getting passed those rights from the task run is possibly causing the problem.
      My Computer


  6. Posts : 3
    32 bit Windows 7 Professional
       #6

    Windows 7 Task Scheduler not Firing Tasks


    Windows 7 Task Scheduler does not fire scripts:: No call in any manner to cscript or wscript (with and without path to both Systerm3 [space] The file location) .. not even one line scripts appending to a log file, fire in Win7 Task Scheduler .. all work noProblems manually from Command and in Windows XP. Is there an update or something new in Win7 that is required? All radio buttons in Win7 checked and unchecked.
      My Computer


  7. Posts : 3
    32 bit Windows 7 Professional
       #7

    Have reset all permissions in Windows/System32/Tasks files to execute and on all script files as well. Still Task Scheduler History states(only) "failure" or "failure to launch". Again, this is a one line script that runs in Command with each and every different call I've tried, and the same do not run in Task Scheduler. Example in Action Tab Program/Script = "C:\Windows\System32\cscript.exe C:\Logs\TestTaskSch.vbs"
      My Computer


  8. Posts : 3
    32 bit Windows 7 Professional
       #8

    Now have built and compiled .exe files for Win7 Task Scheduler to run. TS says it runs but it does not. The .exe simply opens an Excel.WB and closes it. Works fine by double clicking in Win Explorer....but not Task Scheduler. Anybody go anything?
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:12.
Find Us