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 Schedule not working

08 Jul 2015   #1
gill1123

 
 
Task Schedule not working

Hi, I have a bat file that i would like to run every day. I set up my task schedule using Create Basic Task and I am working from windows 7. For some reason my task will not run. When I go open my excel worksheet where data suppose to load, nothing is there. When I go to Task Schedule History, its shows the file did run. Can anyone help me trouble shoot this issue.


My System SpecsSystem Spec
.
08 Jul 2015   #2
DavidE

Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64
 
 

What happens if you manually run the bat file by double-clicking it ?
Does it run successfully ?
If the CMD windows closes too fast to see what it did, add a pause statement as the last statement in your bat file.
That will keep the CMD window open so you can see any error message(s) until you press a key to continue and exit the bat.

You can post a screen print of your "Bat run window" using these instructions:
Screenshots and Files - Upload and Post in Seven Forums
Then folks here can see what you see.

I assume you don't see any helpful error messages in the Task Scheduler History.

You could also post the bat file source code.

Just don't ever post any personal data such as username, userid, email address, password, license key, etc...
Black that out in your screen print(s), if needed.
My System SpecsSystem Spec
09 Jul 2015   #3
gill1123

 
 

Hi David, The bat file runs successfully if I double click and run it. When I run it thru CMD window it run successfully as well. It doesn't want to run it when I schedule it using Schedule task, nothing happens. History says it ran but nothing gets posted in the file.
My System SpecsSystem Spec
.

09 Jul 2015   #4
DavidE

Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64
 
 

Add a pause statement as the last command in your bat file.
Run it from the task scheduler.
That should keep the CMD window open until you click on it.
See if there are any messages displayed that might help.

If you're not running the scheduled task using your Windows logon account you won't see the CMD window.
Worst case, you would have to kill the task in task manager, if you don't see the CMD window and the task doesn't end.
My System SpecsSystem Spec
09 Jul 2015   #5
gill1123

 
 

I am not sure how to add a pause statement. This is what I have in my bat file:
My System SpecsSystem Spec
09 Jul 2015   #6
DavidE

Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64
 
 

Can you EDIT the bat file so it opens in notepad, and post a screen print of what you see in notepad ?
Right click on your bat file, and click Edit.
For me, that opens the file in Notepad, and does not run it.

Screenshots and Files - Upload and Post in Seven Forums

Here is an example of a bat file with the pause statement (edit in notepad)
Task Schedule not working-batsourceexample_01.png


My System SpecsSystem Spec
09 Jul 2015   #7
CountryBumkin

Windows 7 Home Premium
 
 

The problem may also depend where you are running the ".bat" file from.
For example, I created a Task to run a exe program which was to output into a xml file. However I put the exe program file in Windows "Program Files" folder. It would work from the cmd line but not from task scheduler. I had to move the exe program to a different location (I just moved to my Documents folder. The output file went to a folder on a different drive).
Perhaps this is same as your problem.

Last thought - you may need to check the box "run with highest privileges" if its not already checked.
My System SpecsSystem Spec
09 Jul 2015   #8
gill1123

 
 

I have tried the pause statement & scheduled the task, nothing happens.

CountryBumkin, I have changed my bat file location and it worked. Thank you so much!
My System SpecsSystem Spec
Reply

 Task Schedule not working




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Windows 7 schedule Task
Hi, Currently having some problem on the schedule job task on windows 7. example script in my bat file as list below. so we schedule and it run only thing is it did not show the dos windows for us to reply message. kindly help. Thanks echo on said Hello pause.
General Discussion
Schedule task to run when a new profile is created using Win 7
I need to replace a RunOnce procedure from XP. Using it with Win 7 is interrupted with UAC prompts which is an unacceptable option and disabling UAC within our environment is not an option. I am attempted to replace the process with Task Scheduler. However, I only want this to run when a new...
General Discussion
how to set a schedule task to run chkdsk
I tried to to set a schedule task to run chkdsk with a batch file, such as follwoing: echo y|chkdsk C: /F /R shutdown -r I run it on cmd.exe it needs administrator privilege. I run cmd.exe as administrator, then it works. I tried to run it on schedule task and set run by a administrator type...
General Discussion
Schedule a task
I want the computer to execute the following line: mms://wamu-wm.streamguys.com/WAMU-1 at 7:00 am until 10 am Monday through Friday. Unconditionally. I have explored the task menus ad-nausium... and still it does not trigger. There are simply too many options to list them here to...
Customization
How do I schedule a Windows task to run in the foreground?
How do I force a scheduled task to run as a foreground window, to capture the focus when it runs? I wrote a little Delphi app to open a reminder window, but when I schedule it the silly window stays in the background, behind the other 50 windows I routinely have open, and I'm likely to miss it....
Software
Can I schedule a XP Mode task from Win 7?
I have a very old legacy app that would not run or install in Win 7 compatibility mode. I download the Windows VM patch, and the XP Mode application, installed them, and was able to get the application to run. Following some information I found here, I was able to get it pinned to the start menu...
Virtualization


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 05:43.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App