Solved

Scheduled tasks do not run, log shows "the scheduled task did not run because an incorrect password or user name was used".

Posted on 2004-10-02
8
1,250 Views
Last Modified: 2012-06-27
I am using a Windows 2003 to schedule multiple backup jobs (using ntbackup). There are more than 10 backup jobs, and 3 jobs running per night. I scheduled those jobs in 1 shot (task scheduler wizard), using the a local admin account (set to run as using the same admin account). A week later I came back to check. Some did run, some did not. Those that did not run showed "the scheduled task did not run because an incorrect password or user name was used" in the task scheduler transaction log. For example, I may be scheduling a full backup on our accounts database, differential backup of artwork files, and full backup of document folders. The next day I may find the documents and accounts db backed up but not the artwork file differential backup. Then yet the following day only the accounts db backup completed successfully.

I opened the property of the tasks that did not run to reset the run as account, since password seems to be the issue the log was pointing at. A few days later I came back to find again some tasks did run, some did not. Another funny thing is that some of the tasks that did run the previous week did not run the 2nd week, even though I did not touch them. Some jobs stubbornly refused to start, their last status forever stuck with "Never" no matter how I reset the password.

I am backing up to hard disk (customer is averse to tapes). I keep the account logged on to the console of the server all the time.

I did manually test out on 1 or 2 tasks, by choosing to run now. I also tried scheduling it to a time so I can watch it happen. They all worked under my eyes. But I can't get rid of the nagging feeling that the OS "forgets" the password behind my back (the account is a local admin account and it has a proper password). Some of the jobs, I had re-entered the password so many times -- I can't be typing the wrong password everytime! I googled on this issue before. It appears there are other people that ran into similar annoyances working on WindowsXP, but no solution / explanation was offered.

I have taken the time to convert all these backup tasks into batch files, and am considering using AT to schedule them instead. But it strikes me that if AT also does not work, I may not even have a log to reference for troubleshooting. Next Tuesday I will check on the jobs again and decide what to do next.

Much appreciation for your kind recommendations.

DTVIEW
0
Comment
Question by:dtview
  • 5
  • 3
8 Comments
 
LVL 15

Expert Comment

by:harleyjd
Comment Utility
In Control Panel, Scheduled Tasks clcik advanced, then set the At service account as a domain admin account. Make sure it has "run as a service" rights...
0
 

Author Comment

by:dtview
Comment Utility
My trip to the customer's place has been delayed until Wednesday. I will implement it and observe how it fares, and let you know asap. Thanks for the contribution.

dtview
0
 

Author Comment

by:dtview
Comment Utility
The problem has evolved.

1. Scheduled task log shows that for the past 20 days tasks had started but had completed with an exit code of (1f). That can only mean ntbackup didn't run because the duration from start to completion is only 2-3 seconds.
2. The NTbackup log (summary only) says "The saved selection file "Backup.bks" cannot be found." This applies to every single ntbackup task. The same messages were found in Event log (application).
3. I randomly picked out a job and chose "Run". Nothing showed. I checked scheduled task log and it said "** ERROR ** The attempt to log on to the account associated with the task failed, therefore, the task did not run. Verify that the task's Run-as name and password are valid and try again." ... However, it had been able to "start" at the designated day and hour during the past 20 days, even if it didn't execute properly.
4. I went into the Properties page of that task, re-entered the password, chose "Run". This time it ran full blast. The job completed successfully! (no complaints of not being able to locate Backup.bks)
5. I checked out M$ KB 828402. It is possible that this is the cause, but why isn't it consistent (won't happen when I manually ran the job, and didn't happen 20 days ago)???

I have since configured for the log to be "full". I plan to wait until 6pm local time, and schedule a bunch of jobs to run early so I can watch them happen / not happen.

dtview
0
 

Author Comment

by:dtview
Comment Utility
AT is no better than task scheduler. So in the end, I went back to task scheduler and rescheduled all the tasks.

While manually running the tasks to see if account is a problem, something  strange that I found:

1. Certain individual tasks, no matter how I reconfig the password, always returns with error "** ERROR ** The attempt to log on to the account associated with the task failed, therefore, the task did not run. Verify that the task's Run-as name and password are valid and try again." If I delete that task and recreate it, often it will immediately work.
2. Certain tasks can manually run once. When I return to try again the 2nd time, it gives me the same error as in 1. If I try to make it run again 10 seconds later (without re-key in password), it will work.

This is way too unstable. Appreciate any contributions as I really want to finish this one off.

dtview
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 15

Expert Comment

by:harleyjd
Comment Utility
Ok, so what tasks are you trying to run. Post the full script or cmd file and the command line from the at command.

0
 

Author Comment

by:dtview
Comment Utility
Below are 2 of the scripts that runs on a daily basis:

FilesDailyDiff.bat
C:\WINDOWS\system32\ntbackup.exe backup "z:\ARTWORK & PICTURES\" /j "Files Daily Differential Backup" /f D:\files\FilesDailyDiff.bkf /a /d "Set created 10/5/2004" /v:yes /R:no /L:f /M differential /RS:no /HC:off /SNAP:on
C:\WINDOWS\system32\ntbackup.exe backup X:\Download\ /j "Files Daily Differential Backup" /f D:\files\FilesDailyDiff.bkf /a /d "Set created 10/5/2004" /v:yes /R:no /L:f /M differential /RS:no /HC:off /SNAP:on
C:\WINDOWS\system32\ntbackup.exe backup X:\Joii\ /j "Files Daily Differential Backup" /f D:\files\FilesDailyDiff.bkf /a /d "Set created 10/5/2004" /v:yes /R:no /L:f /M differential /RS:no /HC:off /SNAP:on
C:\WINDOWS\system32\ntbackup.exe backup X:\karen\ /j "Files Daily Differential Backup" /f D:\files\FilesDailyDiff.bkf /a /d "Set created 10/5/2004" /v:yes /R:no /L:f /M differential /RS:no /HC:off /SNAP:on
C:\WINDOWS\system32\ntbackup.exe backup X:\newdrive\ /j "Files Daily Differential Backup" /f D:\files\FilesDailyDiff.bkf /a /d "Set created 10/5/2004" /v:yes /R:no /L:f /M differential /RS:no /HC:off /SNAP:on
C:\WINDOWS\system32\ntbackup.exe backup "X:\shared pics\" /j "Files Daily Differential Backup" /f D:\files\FilesDailyDiff.bkf /a /d "Set created 10/5/2004" /v:yes /R:no /L:f /M differential /RS:no /HC:off /SNAP:on

FilesSatFull.bat
C:\WINDOWS\system32\ntbackup.exe backup "z:\ARTWORK & PICTURES\" /j "Files Saturday Full Backup" /f D:\files\FilesSatFull.bkf /d "Set created 10/5/2004" /v:yes /R:no /L:f /M normal /RS:no /HC:off /SNAP:on
C:\WINDOWS\system32\ntbackup.exe backup X:\Download\ /j "Files Saturday Full Backup" /f D:\files\FilesSatFull.bkf /a /d "Set created 10/5/2004" /v:yes /R:no /L:f /M normal /RS:no /HC:off /SNAP:on
C:\WINDOWS\system32\ntbackup.exe backup X:\Joii\ /j "Files Saturday Full Backup" /f D:\files\FilesSatFull.bkf /a /d "Set created 10/5/2004" /v:yes /R:no /L:f /M normal /RS:no /HC:off /SNAP:on
C:\WINDOWS\system32\ntbackup.exe backup X:\karen\ /j "Files Saturday Full Backup" /f D:\files\FilesSatFull.bkf /a /d "Set created 10/5/2004" /v:yes /R:no /L:f /M normal /RS:no /HC:off /SNAP:on
C:\WINDOWS\system32\ntbackup.exe backup X:\newdrive\ /j "Files Saturday Full Backup" /f D:\files\FilesSatFull.bkf /a /d "Set created 10/5/2004" /v:yes /R:no /L:f /M normal /RS:no /HC:off /SNAP:on
C:\WINDOWS\system32\ntbackup.exe backup "X:\shared pics\" /j "Files Saturday Full Backup" /f D:\files\FilesSatFull.bkf /a /d "Set created 10/5/2004" /v:yes /R:no /L:f /M normal /RS:no /HC:off /SNAP:on

I had set the machine to auto-logon in the event any restart occurs, and I had made sure that at auto-logon, the explorer opens to the network drives, so that disconnected network won't be the cause of backup failure.

I did not use AT after discovering AT to be just as unreliable. Right now what I often get is, for the 3 backup jobs that are supposed to be performed at night, I'd often find 2 of them succeeded, while 1 will give me "** ERROR ** The attempt to log on to the account associated with the task failed, therefore, the task did not run. Verify that the task's Run-as name and password are valid and try again." If I right click on that "failed" job and choose Run, it will run in front of my eyes.

I can say that all the jobs had their turn to run properly at least once... at least I don't get any one that just refuses to play a part!

In order to do these backups I have had to schedule for services to be disabled on the target servers (those that share the network drives). They are old NT 4 servers but heck, they are a lot more reliable in this regard. The start/stop service scripts scheduled to run ALWAYS run. I am seriously considering initiating these jobs from the NT4 end.

dtview
0
 
LVL 15

Accepted Solution

by:
harleyjd earned 350 total points
Comment Utility
ok, well I ran into some problems with at stuff on a client site recently, so did away with at completely.

I used nncron to schedule my jobs as it was much more flexible, and runs cmd without being logged on. http://www.nncron.ru/

It uses crontab format, so if you know 'nix cron you'll have no troubles. I'm not a 'nix guy, and even I figured it out.



0
 

Author Comment

by:dtview
Comment Utility
Well, ok, I ran into some free cron software and was contemplating that also.

Since the primary aim is to get it to work, I shall use whatever way to get it to work reliably -- boot the MS task scheduler until specific problem - resolution is offered then.

Thanks and all the best to you
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Preface Having the need * to contact many different companies with different infrastructures * do remote maintenance in their network required us to implement a more flexible routing solution. As RAS, PPTP, L2TP and VPN Client connections are no…
Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

16 Experts available now in Live!

Get 1:1 Help Now