Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • iesco unit rates 2018

    With the panel Un-clipped, iesco unit rates 2018.you will observe the wire harness that should be disconnected. If you're not sure which kind of wall

  • How To Get Around Your School Or Workplace Firewall How-To
  • Apple Watch does not vibrate, how to fix it? Apple Watch
  • How to Run Disk Cleanup in Windows 10 Windows 10
  • What is Ghidra and Why is it Important? Tools Review
  • The Best Smart Christmas Lights For The Holidays Smart Home
  • How to Track Family and Friends From Your Phone Smartphones
  • How to Combine Multiple Images Into One PDF File on Iphone? How-To

Fix Scheduled Task Won’t Run for .BAT File

Posted on October 9, 2020 By blog_786 No Comments on Fix Scheduled Task Won’t Run for .BAT File

If you have a .BAT file and are trying to get it to start automatically using the Windows Task Scheduler, you may have encountered an issue where it just won’t start unless you manually start the task.

I created a batch file that deletes everything inside the temp folder when the computer starts up. I created a simple task in Task Scheduler and hoped for the best. Unfortunately, nothing happened when I booted my computer. After a lot of trial and error, I figured out how to run the script.

In this article, I will walk you through the settings and permissions that need to be changed in order for your batch file to work without manual intervention.

Step 1: Check the file / folder permissions

The first step in fixing this issue is to ensure that the account you use to run the script in Task Scheduler has Full Control permissions to the folder containing the script, the script itself, and any folders / files that the script touches upon startup.

For example, I created the following batch script below:

set folder = “C: test” cd / d% folder% for / F “delims =” %% i in (‘dir / b’) do (rmdir ” %% i “/ s / q || del” %% i “/ s / q)

I saved the .BAT file in the Documents folder. Path: C: Users username Documents. I went to C: Users username, right-clicked the Documents folder and selected Properties. Then I went to the Security tab.

– /

Fix Scheduled Task Won’t Run for .BAT File

As you can see, the Aseem user account has been explicitly added and granted Full Control permission. Now you need to do the same for the folder containing the script and for the script itself. Don’t assume that if you give permissions to the folder containing the script, you will be fine, because it is not. Finally, set permissions for any files and folders that the script will interact with.

In my case, I had to go to C: test, right click on that folder and add my account there with “Full Control” permissions. It’s a little annoying that you have to do this, but it’s the only way to run the script.

Note. The account used to run the script must be a member of the local Administrators group on the computer. In my case, the Aseem account is an administrator account and therefore part of the local Administrators group.

Second Step: Check the Task Scheduler settings

Now let’s go to the Task Scheduler and change the corresponding settings there. Open Task Scheduler and find your task under Active Tasks. They should be listed in alphabetical order.

Fix Scheduled Task Won’t Run for .BAT File

Double click on it and the task will open in the same window. To edit a task, you need to right-click it and select Properties.

Fix Scheduled Task Won’t Run for .BAT File

There are several tabs and a couple of things need to be checked and changed here. First, on the General tab, you need to check the user account that is used to run the task. In my case, this is the Aseem account that I previously gave file system permissions to and which is part of the Administrators group on the computer.

Fix Scheduled Task Won’t Run for .BAT File

Then you need to select the Run regardless of whether the user is logged in or not option and select Windows Vista, Windows Server 2008 in the Configure for box.

Fix Scheduled Task Won’t Run for .BAT File

On the Actions tab, select the script, click Modify, and then add the path to the folder containing the script in the Start In (Optional) box. It may seem unnecessary, but it is not. In my case, I put in the field C: Users Aseem Documents .

Now click OK to save the settings. When you do this, a dialog box may appear where you will need to enter the password of the user account that will run the task. This brings up another requirement. You cannot use an account that does not have a password. The user account must have a password to run the task.

Fix Scheduled Task Won’t Run for .BAT File

Finally, you must manually start the task once in the Task Scheduler to make sure it is running. If after you change all the settings, it works fine manually, it should start when it should. In my case, it should have happened on startup, and after I made the changes, everything worked.

Fix Scheduled Task Won’t Run for .BAT File

Note that if your script at startup refers to different computers in the domain, you should try to use a domain administrator account to run the task. This ensures that the account has sufficient permissions to access remote computers.

Another point to watch out for is if your script is accessing resources on a network share. If your script uses letters to access the network, it may not work. For example, instead of using F: data , you should use \ machinename share_name data in the script. If you still can’t run the script, please leave a comment here and I’ll try to help. Enjoy!

–

Share this:

  • Twitter
  • Facebook
Help Desk

Post navigation

Previous Post: How to Install 64-bit Office via Office 365
Next Post: Fix Error 10016 in Windows Event Viewer

Related Posts

  • Ultimate Guide to Troubleshooting PS4 Help Desk
  • Fix Base System Device Not Found in Device Manager Help Desk
  • 10 Troubleshooting Ideas For When Your Amazon Fire Stick Is Not Working Help Desk
  • How To Fix ‘Not Enough USB Controller Resources’ On Windows 10 Help Desk
  • What is the System Reserved or EFI Partition in Windows? Help Desk
  • What Is Csrss.Exe and Is It Safe? Help Desk

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • AI Tools & Guides
  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • islamic Books
  • Linux
  • Linux Tips
  • Mac OS X
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress
  • 4 Ways to Share WiFi Without Giving Away Your Password
  • How to Get 2 Free Audiobooks From Audible Trial Instead of 1
  • 10 Things to Check Before Publishing a YouTube Video
  • A Simple Trick to Get 50% Discount on Audible for Three Months
  • How to reset your SIM card
DMCA.com Protection Status

Recent Posts

  • 4 Ways to Share WiFi Without Giving Away Your Password
  • How to Get 2 Free Audiobooks From Audible Trial Instead of 1
  • 10 Things to Check Before Publishing a YouTube Video
  • MailTag: Real-time Email Tracking, Made Easy
  • Pokemon Sleep: what is it and how to play

Recent Comments

  1. This Simple Trick Lets You Play YouTube in the Background on iOS on YouTube Not Working? Here Are Quick Fixes To Try
  2. How to Bypass Chromecast DNS and Circumvent Geo Blocking on 5 Cool Websites to Find Good Movies and TV Shows on Netflix
  3. 5 Cool Websites to Find Good Movies and TV Shows on Netflix on check netflix video quality internet explorer
  4. SmartDNS vs VPN “What’s the Difference?” on How to Watch Apple TV on Roku
  5. How to go Back to the old YouTube Layout (2013) on 10 Things to Check Before Publishing a YouTube Video
  • How to Cut Out a Shape in Illustrator Computer Tips
  • Best pipe trades pro calculator 2020

    Best pipe trades pro calculator 2020. 1 - YESWELDER HI-LO Stainless Steel Welding Gauge Inch&Metric for Measurement of Pipe After Fit-up/Alignment F

  • How to Get iOS 14 Public Beta on Your iPhone? How-To
  • How to Fix “We Limit How Often You Can Do Certain Things on Instagram” Error Computer Tips
  • 9 Little-Known Apple Music Tips you Need to Know General Software
  • How to Enter BIOS in Windows 10 and Older Versions Windows 10
  • How to Prevent Shutdown of a Windows Computer Computer Tips
  • How to Fix Internet Explorer has Encountered a Problem and Needs to Close Method

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version