Schedule a Batch File

I need to schedule a batch file to automatically run at night. I have tried every variation of the “AT” command from a command line on the Windows NT Server (NT4) and it will not execute the batch file.

If I run the batch file manually from the command line, everything works just fine. What I entered for the “AT” command was: at 7:30 /next:Th cmd /c c:atchfilename.cmd

I’ve tried with and without quotation marks around the path & file name AND tried including the cmd portion inside the quotation marks AND using cmd.exe AND every other variation I could think of. Nothing works. What is the correct format? I’ve even gone to the Microsoft site and tried what they state is the proper syntax?it didn’t work

begin batch file:@echo offrem delete any current share using drive letter Enet use e: /deleterem create a share to the datanet use e: \scsm1d$ password /user:domainaccountrem jump to the folder the data will be xcopied toh:cdscsm1.bakrem delete all existing files in the foldererase *.* /f/q/srem copy all files in all subdirectories even if errorsxcopy e:public /s/e/v/r/h/q/cend batch file

Any help would be greatly appreciated.

Yep, I know exactly what is happening. From the command line, the batch file is running under your security account?from the AT schedule command, it is running in the context of the System Account. The System account has 100% rights on the local machine, and 0% rights to use network services. So, when you are trying to work with commands that are going through the network director, it will fail.

Try running the Schedule Service under your logon and see if it doesn’t magically work.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS

homes in the real estate industry

Exploring the Latest Tech Trends Impacting the Real Estate Industry

The real estate industry is changing thanks to the newest technological advancements. These new developments — from blockchain and AI to virtual reality and 3D printing — are poised to change how we buy and sell homes. Real estate brokers, buyers, sellers, wholesale real estate professionals, fix and flippers, and beyond may