We help IT Professionals succeed at work.
Get Started

Windows, Scheduled Tasks associated with batch files are failing

jdana asked
Last Modified: 2016-03-24
I configured a Scheduled Task that resides on my Mac (Parallels v10.3, Windows 8), to run a batch file that calls iPerf. The batch file works fine when I call it manually, but fails when I call it with a scheduled task. Here's the batch file.

iperf3 -c -P 1 -p 5201 -f K -V -J -t 10 --logfile "C:\DSD\iPerf\log\COURTROOM_5TH_FL_%computername%_%date:~10%%date:~4,2%%date:~7,2%-iperf.txt"

Open in new window

In an effort to isolate the issue, I created a simpler batch file. Again, the batch file works fine when I call it manually, but fails when I call it from the scheduled task.

dir /b > dirlist.txt

Open in new window

Finally, I created this batch file. This works when I call it manually and when I call it with the scheduled task.


Open in new window

So, the scheduled tasks fail based on the functionality of the batch file. Perhaps it's a Windows security issue. If I change the task to Run whether user is logged in or not, the scheduled task simply hangs.

Security SettingsI activated history in scheduled tasks. History doesn't appear to show me much of use. Here, for example I've configured the scheduled task to run a batch file that doesn't exist, the results look no different.

Scheduled Task History
Watch Question
Lead SaaS Infrastructure Engineer
This problem has been solved!
Unlock 1 Answer and 9 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE