Scheduled Task forgets its password.

N

nokia33948

Hi,
I have read almost all the messages regarding Scheduled Task problems
in a Win2000 environment, but no one helped in solving my problems.

My Scheduled Task simply runs a .vbs file, that closes an exe if it's
running and then restarts it.

The Task should run every 2 hours under a domain administrator account
(but I tried with a local admin account aswell), I have already checked
that all the permissions are correctly set. And they are.

The task works fine for 7 or 8 times but then it stops and the "could
not start" message appears under the schedule tasks window. If a
re-enter the user password, it will run again for 7-8 times, and then
will stop again...

The log file just says:

"StopAndStart.job" (StopAndStart.vbs) 08/05/2006 08:01:00 ** ERROR **
The attempt to log on to the account associated with the task failed,
therefore, the task did not run.
The specific error is:
0x80070569: Logon failure: the user has not been granted the requested
logon type at this computer.
Verify that the task's Run-as name and password are valid and try
again.


Of course, no one changed username or password...

Any valid help?

Thanks.
D.
 
P

Pegasus \(MVP\)

nokia33948 said:
Hi,
I have read almost all the messages regarding Scheduled Task problems
in a Win2000 environment, but no one helped in solving my problems.

My Scheduled Task simply runs a .vbs file, that closes an exe if it's
running and then restarts it.

The Task should run every 2 hours under a domain administrator account
(but I tried with a local admin account aswell), I have already checked
that all the permissions are correctly set. And they are.

The task works fine for 7 or 8 times but then it stops and the "could
not start" message appears under the schedule tasks window. If a
re-enter the user password, it will run again for 7-8 times, and then
will stop again...

The log file just says:

"StopAndStart.job" (StopAndStart.vbs) 08/05/2006 08:01:00 ** ERROR **
The attempt to log on to the account associated with the task failed,
therefore, the task did not run.
The specific error is:
0x80070569: Logon failure: the user has not been granted the requested
logon type at this computer.
Verify that the task's Run-as name and password are valid and try
again.


Of course, no one changed username or password...

Any valid help?

Thanks.
D.

Make sure the account used has the right to run as a batch
job. Run gpedit.msc / Computer Configuration / Windows Settings /
Security Settings / Local Policy / User Rights / Logon as a batch job.
 
N

nokia33948

Pegasus scrisse:
Make sure the account used has the right to run as a batch
<job. Run gpedit.msc / Computer Configuration / Windows Settings /
Security Settings / Local Policy / User Rights / Logon as a batch job.

Hi, it has. I checked thousand of times...

D.
 
P

Pegasus \(MVP\)

nokia33948 said:
Any help, please?

D.

I don't have the faintest idea what might be causing the problem.
In such situations I usually move into "try-this-try-that-mode" in
the hope of stumbling over something that might give me some
pointers. In your case I would do this:

- Use the Task Scheduler to schedule the following batch
file under a ***local*** admin account. It should run
5 minutes past every two hours, same as your problem job.
@echo off
echo %date% %time:~0,5% User=%UserName% >> c:\TS.log
net user %UserName% | find /i "active" >> c:\TS.log

- Type the following command from a Command Prompt to
schedule a slightly different job:
for /L %h in (0,2,23) do at %h:10 /every:m,t,w,th,f,s,su c:\Test2.bat

c:\Test2.bat
@echo off
echo %date% %time:~0,5% User=%UserName% >> c:\AT.log
net user %UserName% | find /i "active" >> c:\AT.log

Report the contents of c:\TS.log and c:\AT.log after a day or two.
 
N

nokia33948

Pegasus (MVP) wrote:
[CUT]
Report the contents of c:\TS.log and c:\AT.log after a day or two.

Hi, this is the contect of ts.log after one day. It stopped at 3 am
with "could not start" error message. The other jobs are still running.

Tue 30/05/2006 15:05 User=WinScheduler
Account active Yes
Tue 30/05/2006 17:05 User=WinScheduler
Account active Yes
Tue 30/05/2006 19:05 User=WinScheduler
Account active Yes
Tue 30/05/2006 21:05 User=WinScheduler
Account active Yes
Tue 30/05/2006 23:05 User=WinScheduler
Account active Yes
Wed 31/05/2006 1:05 User=WinScheduler
Account active Yes
Wed 31/05/2006 3:05 User=WinScheduler
Account active Yes

Thanks,
D.
 
P

Pegasus \(MVP\)

nokia33948 said:
Pegasus (MVP) wrote:
[CUT]
Report the contents of c:\TS.log and c:\AT.log after a day or two.

Hi, this is the contect of ts.log after one day. It stopped at 3 am
with "could not start" error message. The other jobs are still running.

Tue 30/05/2006 15:05 User=WinScheduler
Account active Yes
Tue 30/05/2006 17:05 User=WinScheduler
Account active Yes
Tue 30/05/2006 19:05 User=WinScheduler
Account active Yes
Tue 30/05/2006 21:05 User=WinScheduler
Account active Yes
Tue 30/05/2006 23:05 User=WinScheduler
Account active Yes
Wed 31/05/2006 1:05 User=WinScheduler
Account active Yes
Wed 31/05/2006 3:05 User=WinScheduler
Account active Yes

Thanks,
D.

This was a rather lengthy day or two . . .

As it happens, I have since run into the same issue on one
of my servers, except that my tasks fail after a random
interval of between 30 minutes and 3 days. I am currently
looking for a cure.

My tasks stopped failing after I scheduled this very innocent
batch file to run once every 10 minutes:

@echo off
echo %date% %time% >> c:\test.log

The trick appears to be to run this batch file under the
System account. I don't have the faintest idea why this
should make any difference and I will suspend this job
to see if the problem returns. Ultimately I may engage
the Microsoft helpdesk for further advice.
 
N

nokia33948

Pegasus (MVP) wrote:
[CUT]
- Type the following command from a Command Prompt to
schedule a slightly different job:
for /L %h in (0,2,23) do at %h:10 /every:m,t,w,th,f,s,su c:\Test2.bat

Hi Pegasus,
I have created 6 differnent jobs, altering the line command you
suggested (they use the SYSTEM account). Well, they work! They are
running since 3 days ago!

But if you got news about how to solve the problem with the
administrator accounts, please let me know.

thanks again!
D.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top