Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Task Scheduler Not Operating Correctly

25 Feb 2010   #1

Win 7 64 bit
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 System SpecsSystem Spec
25 Feb 2010   #2

Win 7 Ultimate 32bit

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 System SpecsSystem Spec
26 Feb 2010   #3

Win 7 64 bit

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 Images
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 System SpecsSystem Spec

26 Feb 2010   #4

Win 7 64 bit
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..
My System SpecsSystem Spec
26 Feb 2010   #5

Win 7 Ultimate 32bit

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

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 System SpecsSystem Spec
02 Sep 2011   #6

32 bit Windows 7 Professional
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 System SpecsSystem Spec
02 Sep 2011   #7

32 bit Windows 7 Professional

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 System SpecsSystem Spec
03 Sep 2011   #8

32 bit Windows 7 Professional

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 System SpecsSystem Spec

 Task Scheduler Not Operating Correctly

Thread Tools

Similar help and support threads
Thread Forum
Need help creating a task scheduler task to move files over a network.
Hello everyone, I need to have a task run that will move the contents of a folder from one computer to another over my home LAN. Files get downloaded during the night on one computer and then need to be transfered to another. Usually I am doing this by hand, but then though maybe I could get...
General Discussion
Task Scheduler - Create Task to Display a Message Reminder
How to Display a Message Reminder in Windows with Task Scheduler This will show you how to create yourself, or another user or group, a message reminder scheduled to display for when and how often you like in Windows 7 or Vista using Task Scheduler. All users on the computer will be able to...
simple task scheduler question: changing a task name
Hello, I scheduled some tasks in the task scheduler. One of the tasks has a typo and another I would like to change its name. There doesn't seem to be a way of doing this short of resetting up the tasks from scratch and deleting the original tasks. Would anyone know how to rename tasks in the...
Performance & Maintenance
Task scheduler unable to load task status/active tasks at startup.
My task manager is unable to load task status/active tasks at startup. I get the message: "The selected task "{0}" no longer exists. To see the current tasks, click Refresh." When I refresh I get the same message. I checked and found that under Microsoft the problem was in the defrag...
Performance & Maintenance
Task Scheduler failing to start task with merged network locations
I have two routers I usually connect to (work and home) and each have wireless access. That means there are essentially 4 network locations I have listed. I have merged each respective network location (wired and wireless) into their own singular network location - "Work" and "Home". I also...
General Discussion

Our Sites

Site Links

About Us

Find 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 00:03.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App