Sign in with
Sign up | Sign in
Your question
Closed

Scheduled tasks won't run unless logged in

Tags:
  • Windows
Last response: in Windows 2000/NT
Share
October 19, 2004 3:48:34 PM

Archived from groups: microsoft.public.win2000.security (More info?)

I am having a problem where some scheduled tasks will run, however some will
not run. All use the same Administrator logon to run. It appears that
batch file tasks are the ones with the problem.

If I am logged on the console or even via a Terminal session as
Administrator, all the tasks run, but if I log off all the users, the
windows .exe type of commands run fine, but the batch file commands do not
run. As examples, my AV protection runs a program that checks for updates 4
times a day and my AV is always up to date, however I have a batch file that
calls a few "Net Stop" commands, then NTBackup.exe , and finally the "Net
Start" commands and this batch file and other batch files like it never run
unless I am logged in as the Administrator (or logged in with the console
locked)

Is there a reason why command line batch files are not running on my Windows
2003 Server unless I am logged in?

More about : scheduled tasks run logged

Anonymous
October 19, 2004 4:27:27 PM

Archived from groups: microsoft.public.win2000.security (More info?)

In article <edw8YMftEHA.1404@TK2MSFTNGP11.phx.gbl>,
nojunk_allowed@nospam.com says...
> the console or even via a Terminal session as
> Administrator, all the tasks run, but if I log off all the users, the
> windows .exe type of commands run fine, but the batch file commands do not
> run. As examples, my AV protection runs a program that checks for updates 4
> times a day and my AV is always up to date, however I have a batch file that
> calls a few "Net Stop" commands, then NTBackup.exe , and finally the "Net
> Start" commands and this batch file and other batch files like it never run
> unless I am logged in as the Administrator (or logged in with the console
> locked)
>
> Is there a reason why command line batch files are not running on my Windows
> 2003 Server unless I am logged in?
>
Modify the permissions of CMD.exe in the windir\system32 folder to
assign the BATCH group the Read and the Read & Execute permissions. The
scheduled task is failing because it needs to spawn a command prompt.

Brian
October 21, 2004 4:20:22 PM

Archived from groups: microsoft.public.win2000.security (More info?)

That did not work. What else could be the problem?


"Brian Komar" <bkomar@nospam.identit.ca> wrote in message
news:MPG.1bdf0a75639628f989699@msnews.microsoft.com...
> In article <edw8YMftEHA.1404@TK2MSFTNGP11.phx.gbl>,
> nojunk_allowed@nospam.com says...
>> the console or even via a Terminal session as
>> Administrator, all the tasks run, but if I log off all the users, the
>> windows .exe type of commands run fine, but the batch file commands do
>> not
>> run. As examples, my AV protection runs a program that checks for
>> updates 4
>> times a day and my AV is always up to date, however I have a batch file
>> that
>> calls a few "Net Stop" commands, then NTBackup.exe , and finally the "Net
>> Start" commands and this batch file and other batch files like it never
>> run
>> unless I am logged in as the Administrator (or logged in with the console
>> locked)
>>
>> Is there a reason why command line batch files are not running on my
>> Windows
>> 2003 Server unless I am logged in?
>>
> Modify the permissions of CMD.exe in the windir\system32 folder to
> assign the BATCH group the Read and the Read & Execute permissions. The
> scheduled task is failing because it needs to spawn a command prompt.
>
> Brian
Related resources
November 17, 2008 2:31:58 PM

You probably have mapped drives in your batch file. Try using UNC pathing \\servername\directory.
April 13, 2009 9:47:43 PM

I'm also having this same issue and mapped drives are not the cause (as I'm trying to spawn a program on the local C drive).

Anyone else know what could be causing this and the fix?
July 6, 2009 8:10:23 PM

I had similar problems. Adding "cmd.exe /c" seemed to do the trick like so:

cmd.exe /c "c:\full\path\to\batchfile.bat"
March 5, 2010 2:33:25 PM

If your trying to use a regualar user account without admin priviledges, mod'ng permissions on the cmd.exe file did the trick. Regular users do not have right to cmd.exe by defualt unless your logged on interactively.
September 21, 2010 9:26:36 PM

Thanks, Willie! I had been scratching my head for weeks wondering why my batch files weren't running. They work now!
September 22, 2010 5:17:06 PM

This topic has been closed by Mousemonkey
!