Solved

Periodic Task Scheduler Error - does not start

Posted on 2002-05-01
37
4,962 Views
Last Modified: 2013-12-28
I have two tasks scheduled on a Windows NT System through Task Scheduler.  They are set up to execute Tuesday through Saturday at 2 and 3 in the morning.  

It has happened twice now, that for some reason, the task does not start on a Tuesday morning.  No changes have been made to the executable or to the task.  No apparent changes with the network or with network backups.  The first time this happened, I deleted the tasks and re-added them and everything worked fine.  We thought maybe somehow the tasks got corrupted.  

This time I viewed the log and received this error;
"The attempt to log on to the account associated with the task failed, therefore the task did not run. The specific error is: 0x8007052e: Logon failure: unknown user name or bad password.  Verify that the task's Run-as name and password are valid and try again."  

The big question is Why?  Nothing has been changed with the user name or password.  It's puzzling.  Any help or ideas would be appreciated.  

smsak.
0
Comment
Question by:smsak
37 Comments
 
LVL 4

Expert Comment

by:EricWestbo
ID: 6985079
Does it run Wednesday through Saturday?  And is this being run on a remote system or the local system?

Apparently, the user name or password in the task is not valid on the system. The following schtasks /change command updates the user name and password, and may help with your issue:


SYNTAX

schtasks /end /tn TaskName [/s computer [/u [domain\]user /p password]] /?


PARAMETERS

/tn TaskName
Identifies the task that started the program. This parameter is required.

/s Computer
Specifies the name or IP address of a remote computer (with or without backslashes). The default is the local computer.

/u [domain\]user
Runs the command with the permissions of the specified user account. By default, the command runs with the permissions of the user logged on to the computer running SchTasks.

/p password
Specifies the password of the user account specified in the /u parameter. This parameter is required when the /u parameter is used.

/?
Displays help.


REMARKS
Using the /s, /u, and /p command-line options
The /u and /p command-line options are available only when you use /s. You must use /p with /u to provide the user's password.


SOURCE: http://www.microsoft.com/technet/treeview/default.asp?url=/TechNet/prodtechnol/winxppro/proddocs/schtasks.asp

0
 
LVL 3

Expert Comment

by:gro031899
ID: 6985770
Hi smsak,
did it ever run before without problems? What does the job? Batchjob with only local actions? I assume that that you never changed the user account for the task scheduler. Right?
gro
0
 

Author Comment

by:smsak
ID: 6985909
EricWestbo & gro,

Here is some more detail.   I'm running these two scheduled tasks from my local PC.  They have been running for at least 6 months every Tuesday thru Saturday without any problems.  I had set these tasks up by clicking on My Computer, Scheduled Tasks, Add Scheduled Tasks.  They run an Visual Basic executable that is located on the network. Only two times did I run into a problem where the tasks never started.  One problem was maybe 2 months ago and the other just recently.

smsak.
0
 
LVL 4

Expert Comment

by:EricWestbo
ID: 6985942
So the app *is* remote.  That combined with the error code (0x8007052e) supports the user/password issue originally stated.

As today is Thursday, let me ask: did it run today?

Another question... is the error generated for BOTH tasks or just one of them?  

Finally, open a cmd prompt and enter the command "AT" (without quotes), and press enter.  What comes up in response?


Let us know...

/ew
0
 

Author Comment

by:smsak
ID: 6986348
EricWestbo,

Thanks for your response.

Answer for Question 1:  The tasks have ran ever since I received this error.  Which means they ran Wednesday and Thursday morning successfully.  But, on Tuesday, when I noticed they didn't run, I right clicked on both tasks one at a time and selected 'Run' and they failed with the same message. Then I deleted the first task, re-added it and it ran fine.  And then, the second task which I did not delete and re-add ran fine too.  Almost like the re-add of the first task reset something.

Answer for Question 2:  Both tasks had the same error when I checked the view log on Tuesday.

Answer for Question 3:  I did a Start/Programs/Command Prompt and typed in AT at the C:\> prompt and pressed ENTER.  I received the message "There are no entries in the list".

I would understand the user/password issue if it wasn't for the fact that these tasks have been executing successfully prior to the failure and that no changes were made to the tasks.

Also, maybe this will help.  I had mentioned earlier that this was the second time the tasks had failed.  The first time this task failed, I received a different error message which was;
"The attempt to retrieve account information for the specified task failed; therefore, the task did not run. Either an error occurred, or no account information existed for the task.
     The specific error is:
     0x8004130f: No account information could be found in the Task Scheduler security database for the task indicated."

Also, I noticed my 'AT Service Account Configuration' in Task Scheduler on my PC is set to 'System Account' instead of 'This Account'.  I don't know if that's an issue or not.

smsak.
0
 
LVL 4

Expert Comment

by:EricWestbo
ID: 6986374
The 0x8004130f error occurs because when a task is pushed to another computer, the security descriptor is broken. If you are not logged on, Windows cannot access the local Protected Storage database to verify if the task can be run.  To resolve this issue, you need to be logged onto the computer when the scheduled task is set to run so Windows can gain access to the local Protected Storage database.

Is your system always running with you logged on?  If so, does the system and/or network have a "log off after x hours of inactivity" policy set?  This might be an issue...

let's hear some more...

/ew
0
 

Author Comment

by:smsak
ID: 6986586
EricWestbo,

My system is always running.  I lock my workstation each evening and power down the monitor only.  

My Task Scheduler is set to Automatic.  I don't know of any log off settings that could be doing it.  Task Scheduler is set to stop the task if it runs for 72 hours but that's only if it's running that long.  These tasks, when ran successfully, result with a task completed with an exit code of (0) in the view log.

I talked to our network administrator and she's not aware of any log off settings from the network side. Nothing unusual is shown in the event viewer.

smsak.
0
 
LVL 4

Accepted Solution

by:
EricWestbo earned 150 total points
ID: 6986607
being that this has only happened 2 times, I'm thinking it may be a lost connection issue or an auto logoff.

Let me ask this... what policies does the network have when a user tries to unlock a pc unsuccessfully?  For example, Joe Schmo comes up to your PC and tries to access it on Monday night.  Will it lock the user account out (your account, obviously)?  What if he tried to reboot the PC with the power switch?

I don't think your issue revolves around the task scheduler.  This is an account/access issue to be sure.


/ew
0
 
LVL 4

Expert Comment

by:EricWestbo
ID: 6986615
just another thought from the peanut gallery... these errors didn't happen to occur around the time of the Daylight Savings time changes, did they?


fishing...
0
 

Author Comment

by:smsak
ID: 6986887
EricWestbo,

If someone tried to unlock a PC unsuccessfully, they could retry as many times as they want, no locking out. If the PC was rebooted the user would still need to enter a network password to log on.  In this case it allows a few tries before totally locking out the system to where even the normal user would need to go through the network administrator for access.

Yes, you are right.  The first occurence of this problem occured right after Daylight Savings time.  We thought Daylight Savings may have had something to do with it, possibly corrupting it. I ended up deleting the task and re-adding it.  It worked through Saturday April 27th. On Tuesday the 30th, it didn't run again.  

What do you know about the Daylight Savings issue?

smsak.
0
 
LVL 4

Expert Comment

by:EricWestbo
ID: 6986939
DST is just a shot in the dark... thinking maybe inconsistency with local time and network time might have something to do with this, but unlikely... will research more.

More importantly is the reboot.  What happened on Monday the 29th?  Did you use the system that day?  Was there a power outage and/or did you need to log on when you came in on the 30th?

Had you been bumped off over the wkend or on Monday, that would explain the inability for windows to run the task.

/ew
0
 

Author Comment

by:smsak
ID: 6986990
EricWestbo,

Ahhhh, I did have to reboot my system that Monday because I loaded service pack 6a for VB and Internet Explorer 5.5 SP2.

Maybe a reboot is causing a problem with Task Scheduler.  I didn't notice anything different when I came in Tuesday.  I believe I still had to unlock my system.

smsak.
0
 
LVL 4

Expert Comment

by:EricWestbo
ID: 6987034
could very well be the reboot that's doing it... at this point I don't think it's necessarily going to be a recurring issue & now that you know it can be boot related, I'd suggest that you just verify the tasks on Monday.

Good for you?

/ew
0
 

Author Comment

by:smsak
ID: 6987143
EricWestbo,

Thanks for your help. I just tried restarting my computer and I right clicked one of the tasks, selected run and it ran o.k.  I then powered down my computer, powered it back up and tried the task again and it ran o.k.

So, I was hoping it wouldn't run but that didn't happen. I will just have to monitor it.  

smsak.
0
 
LVL 3

Expert Comment

by:gro031899
ID: 6987929
Hi smsak,
the problem is, that the local system account, under which the task scheduler is running, does not have the rights to access the network ressources (especially if you logout.)
I recommend the following (if possible):
1. create a domain user (if you have a domain and the necessary rights)
2. give this user on your local machine (where the task scheduler is used) the rights: logon as a batch and act as a service (if you put this user in the local admin group you have to do it too, because these 2 rights where not automatically added)
3. put this user in the option menu to run the task scheduler service with this accout (I dont know the exact menu because I have german windows)
4. you can also assign your 2 tasks with this accout (right click on your tasks and choose properties)
This helped many times, also in EE (try the search function here at experts-exchange)
hope it helps you too
gro
0
 

Author Comment

by:smsak
ID: 6988674
gro,

Thanks for your input.  I don't see how the local system account wouldn't have the rights to access the network resources because the tasks have ran successfully weeks before and are running successfully since the last error.

smsak.
0
 
LVL 3

Expert Comment

by:gro031899
ID: 6993105
Hi smsak,
believe me, here is a Micro$oft answer: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q124184
I dont know, why it sometimes works and sometimes not, but system account could not access the network.
gro
0
 

Author Comment

by:smsak
ID: 7021398
Thanks for your help.  I haven't had a problem with it since.

smsak.

0
Are end users causing IT problems again?

You’ve taken the time to design and update all your end user’s email signatures, only to find out they’re messing up the HTML, changing the font and ruining the imagery. What can you do to prevent this? Find out how you can save your signatures from end users today.

 
LVL 4

Expert Comment

by:EricWestbo
ID: 7021928
Glad to hear, smsak!  Best of luck!

/EW
0
 

Expert Comment

by:nickpang
ID: 7438232
Has this problem recurred since the last entry here? We had a similar problem just recently:

WinNT4.0 SP5 - We have about 10 scheduled tasks running applications every day, ranging from 0:05 to 12 noon. The applications are not on a network, but reside locally on the NT machine. These tasks have been running successfully for about a year and a half, since April of 2001.

About a week after the October 2002 time change, the scheduler stopped kicking these tasks off. We initially tried re-inserting the admin password into the tasks, but that didn't work (we were testing it by running the applications from the scheduler by right-clicking and hitting "run"). We finally stopped and restarted the scheduler service in the service manager, and that seemed to work for a while.

The scheduler worked for about 3 days, then suddenly the applications failed to kick off again. Testing them using the right-click/run failed to kick off the applications. When we re-inserted the password, the applications ran using the test method (I should mention that there was no problem running the applications directly outside the scheduler).

This time, we disabled the existing tasks and recreated all the scheduled tasks, except for one (which was inconsequential if it ran or not) which we left as a control. We only re-inserted the password into the control. It's only been 3 days since recreation, but the scheduler seems to be working for all (new and control) tasks.

Based on the information in the scheduler log, when the tasks failed to fire, it was because "No account information could be found in the Task Scheduler security database". Apparently, the scheduler security database was losing the admin credentials, and not running the tasks. I have not been able to find anything on the web about this issue, except a message from somebody in Australia indicating the same problem when they had a time change.

We're going back in our logs to see if this has been a problem in the past, especially around the time changes. At this point, I don't know what to do, except monitor it carefully.
0
 

Expert Comment

by:bfields87
ID: 7442787
I've been having the same exact issue with NT Scheduler on several servers for the past year.  Once in a while, the scheduled job will "Lose" it's password for no known reason.  This happens most when we reboot the server, but not always.  It also just happens right out of the blue.

I've been told it's a "known" problem at Microsoft, but can't find any confirmation on it.  Win2K supposedly fixes it, but I have had it happen once on a Win2K server.  Go figure??

I've been looking at 3rd party packages, expecially the Arcana Scheduler, but am finding it has it's own shortfalls.  It works great, unless you are trying to "Shutdown" remote servers.

This is probably one of the most frustrating issues I have on my plate, and would like to get it resolved.  However, I will probably have upgraded to Win2K first.

I will keep looking for an answer, though.
0
 

Author Comment

by:smsak
ID: 7443609
I have not had any problems since May 2002.  I have deleted my scheduled tasks once and re-created them after upgrading my system to Windows 2000 and Office 2000, just to prevent a possible problem with the scheduled tasks.

I do monitor it carefully and am still looking for an answer as well.



0
 
LVL 38

Expert Comment

by:PaulHews
ID: 7608314
I've been having a similar problem to bfields87 on a W2K Pro system using a local user acct with admin rights to run the tasks.  I wonder if it is related to password expiration, despite the fact that my password is set to "never expire."  I seem to need to reset the password on the tasks periodically.  Next time it occurs, I will note the date and see how many days it takes and see if that aligns with a security policy of resetting passwords.
0
 

Expert Comment

by:wglaser
ID: 7615980
Same problem here.

Running W2K, my scheduled tasks refused to execute after the transition out of Daylight Savings Time (10/27/2002).  In my case the fix was to re-enter the administrator password for the tasks in the Scheduler.  I'm not amused by this bug.  I'm guessing my only option is to disable DST on the machine, but I haven't confirmed yet if that works.  Would love to hear advice from other folks.
0
 
LVL 1

Expert Comment

by:rawcane
ID: 7663492
I'm so glad I'm not alone! I am wondering if there may be different issues happening here though -
I too had problems with an NT4 box stopping working after daylight saving which caused no end of confusion. Sounds like this might just be an NT4 feature as so many people have seen the same thing at that time.

The other flavour of this problem is more sporadic (similar to the original problem mentioned here) -
seemingly with no consistency whatsoever, scheduled tasks on my win2k box will fail with the same user account error (these are not using the system account btw - just my normal user account which has administrative rights on my machine).

One thing I thought might be making a difference is whether my machine is locked or not but I have not been able to pin it to this in any combination of events. Does anyone have a definitive answer on whether this should or does have any effect?

Something else which I thought may be relevant is that we have recently had some interesting stuff happening with domains etc between unix and windows parts of the network. The last time my task failed I changed my preferred dns back to the windows dns from the unix one which I had been using recently and it has not broken since (though given how sporadic it was I am not convinced that I have fixed it for good).

Does anyone know if there any way that the task scheduler might depend on the dns to validate the account information?
0
 

Expert Comment

by:blackswan
ID: 7677064
same probleme

w2k task scheduler lose password nearly every day !

any solutions ?

g blackswan
0
 
LVL 1

Expert Comment

by:rawcane
ID: 7677167
Since I stopped locking my pc and have put my dns back to the windows dns server it hasn't failed again (yet) but I haven't been able to prove what was happening so I can't say for sure...

PS While we're on the subject of task scheduling does anyone know if there is a way of scheduling tasks from the command line?
I've tried using AT but
a) AT doesn't seem to know about other scheduled tasks and
b) I don't seem to be able to schedule for one off tasks on a specific date.
Is there another alternative?
0
 

Expert Comment

by:blackswan
ID: 7680058
hi

a) if you change (edit) a task with the w2k scheduler the at.exe jobs will be converted... so you can't see them in at.exe anymore

b)

at /?

/next:date[,...]   Runs the specified command on the next occurrence of the

g blackswan
0
 

Expert Comment

by:blackswan
ID: 7684346
hello

we solved the problem with putting the "logon as a batchjob" policy to the network profile

g blackswan
0
 

Expert Comment

by:blackswan
ID: 7684347
hello

we solved the problem with putting the "logon as a batchjob" policy to the network profile

g blackswan
0
 
LVL 1

Expert Comment

by:rawcane
ID: 7684604
Re:
/next:date[,...]   Runs the specified command on the next occurrence of the

I tried everything that I could think of to get this to work but I just can't make out the syntax and it gives no indication as to the date format one needs to use.

If I want to run a batch file called test.bat at 18:30 on 25th January how would I do it?

From reading the at /? it looks like something similar to the following could work...

at 18:30 /next:25/01/2003 "test.bat"

but I've tried all combinations and date formats and can't get it to work... am I missing something really stupid or have I just not hit on the right syntax yet?
0
 

Expert Comment

by:tomrubens
ID: 7704976
I have 2 windows 2kpro machines using scheduler to run ntbackup twice a week.  October 23, 2002 is the last time it ran properly.

Reentering the password in scheduler corrected the problem.

I, too, am very suspicious about the change from Daylight Savings time to Standard time as the cause of the problem.

I will be carefully watching the time change to Daylight Savings time this spring.
0
 

Expert Comment

by:wglaser
ID: 7984095
I have the answer!  

Scheduled Tasks under Win2k, and possibly other versions of the OS, do NOT behave well during daylight savings time transitions.  I conducted exhaustive tests by setting the clock to various times of year and discovered repeatable problems on these days (10/27/2002, 4/6/2003, etc.)

The only known solution is to disable "Automatically adjust clock for daylight savings changes" in the Control Panel.  I hope this works for everybody.

---Will
0
 
LVL 12

Expert Comment

by:trywaredk
ID: 8142300
:o) smsak,gro and rawcane..., and everybody else.

PLEASE READ THIS CAREFULLY:

You must NEVER NEVER grant a Domain User Group membership of the Local Admin Group on each workstation.

And You must NEVER grant the same Domain User membership of the Local Admin Group on more than his/hers own workstation

If You grant Everyone membership of the Local Admin Group, Everyone gets unlimited REMOTE access power of every workstation on Your network.

The unlimited REMOTE access involves:
1. Explorer: \\ComputerName\C$
2. Registry
3. Computer Management (Control Panel)


IF YOU WANT TO KNOW MORE ABOUT THIS ISSUE:
http://www.experts-exchange.com/Security/Win_Security/Q_20506528.html
http://www.tryware.dk/English/W2kLocalGroupPolicy/TotalAdminPower.html
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/windows2000serv/evaluate/featfunc/07w2kadc.asp
http://support.microsoft.com/?kbid=182734


IF YOU WANT TO TEST IT:
You have to grant Everyone to the local admin group on BOTH test-workstations, and logout and logon again.

Important: You have to make a new logon after creating the credentials, because they are given in W2k in the second where You press ENTER to password when logging on.

Please reply, when You have removed Everyone again!


Many Regards

Jorgen Malmgren
IT-Supervisor
Denmark
0
 

Expert Comment

by:joshwa
ID: 8445669
Found this on USENET:

http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b328773

Haven't called MS yet, though.
0
 

Expert Comment

by:tomrubens
ID: 8459722
I had this problem last fall and I had it beginning two weeks ago.  Right after the change from standard to daylight savings time and daylight to standard time.

Reenter your passwords in the scheduler.

Tom Rubens
0
 

Expert Comment

by:netwerkingnut
ID: 10167160
I'm new at the M$ admin game so please bear with my ignorance.

I was wondering if anyone has figured out the CL batch code for running dfrg.msc and having it auto defrag and close when complete, then I want it to auto logoff. I have begun to learn about the Task Scheduler and figured out thusfar, that I need to create a batch file to do what I want to do and then schedule the task. I also learned to create a user on the local machine, have it a member of the admin group, and assign a un-changable password. I did this so far, but haven't figured out the CL code yet.

Any clues?

Thanks,
Netwerkingnut@yahoo.com

0

Featured Post

Are end users causing IT problems again?

You’ve taken the time to design and update all your end user’s email signatures, only to find out they’re messing up the HTML, changing the font and ruining the imagery. What can you do to prevent this? Find out how you can save your signatures from end users today.

Join & Write a Comment

The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now