Go Back   TechArena Community > Technical Support > Computer Help > Window 2000 Help
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags:

Sponsored Links



Scheduled task will not run as scheduled!

Window 2000 Help


Reply
 
Thread Tools Search this Thread
  #1  
Old 03-12-2009
alex.birchall@gmail.com
 
Posts: n/a
Scheduled task will not run as scheduled!

Hi,

The situation is this:

I am trying to make use of the psshutdown.exe tool available from
Sysinternals (http://technet.microsoft.com/en-us/sysinternals/
bb897541.aspx) to reboot a Windows 2000 Professional server.

I have a batch file containing the following:

@echo off
c:
cd\
cd pstools
psshutdown -f -r

goto EOF

:EOF
exit

This batch file is saved in the root of C:

I can run this batch file manually (i.e., double-click on it and it
works - the computer restarts).

I set up a scheduled task to run this batch file at a specified time
in the future.

If I choose to run the scheduled task now, I can and it works.

But if I leave the scheduled task set up and lock the computer, the
scheduled task will not run. The Last Result appears to indicate it
ran successfully (0x0), but it demonstrably has not.

I have exactly the same scheduled task set up on a different Windows
2000 server and it works.

I'm stumped! Can anyone explain this mystery?

Many thanks in anticipation.

Alex Birchall
Reply With Quote
  #2  
Old 03-12-2009
Pegasus [MVP]
 
Posts: n/a
Re: Scheduled task will not run as scheduled!


"alex.birchall@gmail.com" <alex.birchall@googlemail.com> wrote in message
news:3f9dfdec-34d8-4e59-a622-922054117c3c@c3g2000yqd.googlegroups.com...
> Hi,
>
> The situation is this:
>
> I am trying to make use of the psshutdown.exe tool available from
> Sysinternals (http://technet.microsoft.com/en-us/sysinternals/
> bb897541.aspx) to reboot a Windows 2000 Professional server.
>
> I have a batch file containing the following:
>
> @echo off
> c:
> cd\
> cd pstools
> psshutdown -f -r
>
> goto EOF
>
> :EOF
> exit
>
> This batch file is saved in the root of C:
>
> I can run this batch file manually (i.e., double-click on it and it
> works - the computer restarts).
>
> I set up a scheduled task to run this batch file at a specified time
> in the future.
>
> If I choose to run the scheduled task now, I can and it works.
>
> But if I leave the scheduled task set up and lock the computer, the
> scheduled task will not run. The Last Result appears to indicate it
> ran successfully (0x0), but it demonstrably has not.
>
> I have exactly the same scheduled task set up on a different Windows
> 2000 server and it works.
>
> I'm stumped! Can anyone explain this mystery?
>
> Many thanks in anticipation.
>
> Alex Birchall


Throw out some of the superfluous stuff from your batch file, then run this
version instead:

@echo off
echo %date% %time% %UserName% >> c:\test.txt
c:\PSTools\psshutdown -f -r 1>>c:\test.txt 2>>&1

Now allow the job to be run under the Task Scheduler, then examine the file
c:\test.txt. You will most likely find that the job *did* run, even though
you're convinced that it did not. You will probably also find the reason why
it did not shut down the machine as expected.

Remember that scheduled tasks must be run under an account that has a
non-blank password.


Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Window 2000 Help


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Scheduled task will not run as scheduled!"
Thread Thread Starter Forum Replies Last Post
Windows Scheduled Task: Unable to start task. 0x80070005: Access is denied. BCU_AJones Windows Software 1 01-12-2011 11:49 PM
Scheduled Task does not run coreymac1222 Windows XP Support 3 06-03-2009 02:06 AM
Can't run scheduled task alicorn2 Windows Server Help 8 22-04-2008 06:07 AM
How to run a scheduled task via a batch job akkha1234@gmail.com Windows Server Help 3 18-05-2007 07:35 PM
Scheduled task error BBran Windows Security 0 06-11-2006 11:21 PM


All times are GMT +5.5. The time now is 09:55 PM.