Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows Task Scheduler

Status
Not open for further replies.

hesaloser

Technical User
Aug 21, 2007
34
US
Hey All,
I came across an issue the other day while creating a backup .bat file. Long story short, the Task Scheduler process isn't running on my machine.

So first things first I go out on the net and look for the specific file name for the process task scheduler. I come up with Schtasks.exe. OK assuming this correct i do a search on my server for Schtasks.exe, sure enough it exists in %system32%, the date it was created is the same date it was modified (Thinking to myself OK doesn't look like this file has been compromised by any viruses) Looking at the accessed date it shows todays date.

Now i take the next step and try to start the process manually. Again Task Scheduler does NOT show up in services.msc I go into CMD prompt issue a Net Start to view running services. Again no task scheduler or scheduler process. I type net start "task scheduler" and receive a error "the service name is invalid". Ok so i try net start scheduler, same error message.

Ok so now i go into the scheduled tasks folder, I create a new test task, using the calculator, go through the prompts, enter the administrator password then this is the error message i receive:

Task Scheduler
The new task has been created, but may not run because the account information could not be set. The specific error is: 0x80041315: The Task Scheduler Service is not running.

Now, i go back to scheduled tasks folder, find the newly created calculator task and right click it and select run. It prompts me with:
The service is currently stopped. No tasks will run unless the service is started. Do you want to start the service now?

So i select yes, thinking this will solve my problem...and a few moments later i receive:Unable to start the service

Another interesting aspect to this is when i enter the Manage MMC then attempt to open "services and applications" i receive: MMC has detected an error in a snap-in. It is recommended that you shut down and restart MMC. I can continue by choosing to ignore errors and not report to Microsoft.

Finally i came across stating that the task scheduler service must be started with the System Account.

The KB article lists how to correct this:
1. Right-click My Computer and from the drop down menu click Manage.
2. From the Services and Applications menu, click Services.
3. From the right scroll down menu, double-click Task Scheduler.
4. Click the Log On tab, select the Local System Account and Allow Service to Interact with Desktop options, and then click Apply.
5. Click the General tab, click Start.

However, Because Task Scheduler doesn't show up in services.msc and because accessing "services and applications" via the management route bombs out the MMC snap-in and it wouldn't matter anyway i guess cause it still wont be in the process list.

SO how can i check/change Task Scheduler LogOn properties?


Thanks In Advance!
 
Joseph,
No luck with the SC command. Still I receive the "The specified service does not exist as an installed service". Is there anyway the task scheduler could have been un-installed, yet the executable left unmodifed in my sys32 folder?

By the way i used SC start "task scheduler" and SC start scheduler.

Thanks for you help
 
Open the Scheduled Tasks window and select the "Advanced" menu. Select "AT Service Account" and make sure "System Account" is selected. Then, back on the "Advanced" menu, select "View Log". Maybe there is a hint in the log file.



-Joe
 
Hmm…opened scheduled tasks via, Start | Control Panel |Scheduled Tasks | (right-click) Open
Not seeing an advanced menu… Is there another way to view Scheduled Tasks?
 
There are other ways with command line.

The Advanced Menu should be in the same menu bar as File, Edit, View....

The log can be found at c:\windows\SchedLgU.Txt

-Joe
 
wow, it must be monday...how'd i miss the advanced menu.... err.. anywho, when i try to open AT Service Account i get this error: Unable to determine AT Service account information. Here is an excerpt of the log file, most recent service start was back in late april....

"Task Scheduler Service"
Started at 3/31/2007 6:50:16 PM
"Task Scheduler Service"
5.2.3790.1830 (srv03_sp1_rtm.050324-1447)
"Task Scheduler Service"
Exited at 4/18/2007 1:21:26 PM
"Task Scheduler Service"
Started at 4/18/2007 1:21:29 PM
"Task Scheduler Service"
5.2.3790.1830 (srv03_sp1_rtm.050324-1447)
"Task Scheduler Service"
Exited at 4/18/2007 1:21:48 PM
[ ***** Most recent entry is above this line ***** ]
 
Darn, I was hoping the log file would show us something.
I think I found a solution though, try this:

1. Start Registry Editor (Regedt32.exe).
2. Locate the ImagePath value under the following key in the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Schedule
3. Double-click the ImagePath value.
4. Change the path to:
%SystemRoot%\System32\svchost.exe -k netsvcs
5. Quit Registry Editor.

I adapted that from the link below but replaced the NT4 path with the path on a 2003 box.

-Joe
 
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Schedule does not exist. Wonder if there is a way i can just reinstall the task scheduler?
 
Try exporting the registry key from another 2003 server and importing it into the registry on this box.

OR

Try re-installing Internet Explorer. Task Scheduler used to be part of IE. I am not sure the same is true for 2003 but it isn't going to hurt anything.

-Joe
 
As soon as i get some time i'll see if i can dig up a test server and export the registry key.

Thanks alot for your help
I appreciate it
 
Ok so I got a copy of the reg key, imported it, all went smooth. However now it still wont allow the service to start, same situation. Do you think there is anything else i can try before having to do a restart?
 
Is the service showing up in the services mmc? If so, go back to the Advanced menu of the scheduled tasks window and select AT Service Account. Make sure it is set to system account.

If all is good there, I would try re-installing IE before giving up completely. Task Scheduler really was part of IE in the past and seeing as IE is so integrated and how Microsoft doesn't change things until courts tell them to, it probably still is.

-Joe
 
The service does not show up in the services mmc. I will attempt to re-install IE and see what happens after that!
 
Well reinstalling / upgrading IE seemed to fix it for me. Thanks for your help!
 
When you say IE you do mean Internet Explorer correct?

I find that funny its combined with task scheduler.
 
Yes Internet Explorer, i ended up just installing IE7, and all was well after a reboot.

Yeah i find it interesting myself, you think by now they would have separated the two.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top