?
Solved

Scheduled tasks problem

Posted on 2005-03-14
10
Medium Priority
?
363 Views
Last Modified: 2012-05-05
I'm going to be posting a number of questions all resulting from a common event, which I will describe in a miniute. So if you get the feeling of deja vu my apologies.

Following my PDC going phut! I installed Active Directory on another server and made this into a DC. It seemed to happily replicate from another DC. However at one point during the installation process it warned me that it was going to get rid of all local accounts. Which it did but did a few more things besides!

So my first problem is that it removed the administrator account and as a consequence none of the schedule tasks work (the all fail saying that the account doesn't exist). Now I am happy enough to recreate them but I need to get at the parameters which aren't fully visible when you open the task up as it will not allow the task to be edited.

So the question is there a way in which I can edit or view the actual .job files or alternatively change the account under which each job runs (without using the task property page).

Thanks
Steve
0
Comment
Question by:mouatts
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 17

Expert Comment

by:Eagle6990
ID: 13537986
Try using the AT command from the command prompt to view more detail of the task and/or recreate them.
0
 
LVL 11

Author Comment

by:mouatts
ID: 13538135
sorry AT displays only "There are no entries in the list." which is correct as AT displays task running under SYSTEM and as I said the ones that I was interested was the local administrator acount.
0
 
LVL 35

Expert Comment

by:Nirmal Sharma
ID: 13542002
So my first problem is that it removed the administrator account and as a consequence none of the schedule tasks work (the all fail saying that the account doesn't exist). Now I am happy enough to recreate them but I need to get at the parameters which aren't fully visible when you open the task up as it will not allow the task to be edited.

By default, before promoting this computer to domain controller the computer was Member server or standalone and all tasks were running in the security context of Local Administrator now you have promoted and domain administrator has taken over control to this machine. Thus SIDs changed for both the accounts. NOTE: - Windows uses only SIDs to identify an account and it does not use name. Now your problem is that you do not have security rights to edit these tasks.

Please answer the following questions: -

1. What all entries you see in \Winnt\Tasks folder.
2. Did you try to Stop and Start Task Scheduler service from services.msc snap-in to re-generate security ID under the security context of domain administrator account.
3. Did you try to change the AT service account from Advanced Property and then specifying the Domain Administrator account.
4. Did you see the Log and find an cause listed under it.

Let me know.

Thanks
SystmProg
0
10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

 
LVL 11

Author Comment

by:mouatts
ID: 13547639
I understand what the problem is what I really want to do is see the data of the jobs, and this it won't allow because each of the jobs is still 'owned' by the now defunct Local Admin account.

1 All the tasks are there is that's what you mean
2 I did but it isn't a problem with the scheduler (which runs under SYSTEM not admin by the way)
3 I did but you can't do this under windows 2000, I think you could under NT as I think I did this once. W2000 insists that the task scheduler is run under SYSTEM.
4 Yes and the gist of the message is that it can't find the old local admin account.

0
 
LVL 35

Expert Comment

by:Nirmal Sharma
ID: 13553590
>>>I understand what the problem is what I really want to do is see the data of the jobs, and this it won't allow because each of the jobs is still 'owned' by the now defunct Local Admin account.

Yes. I can understand but retreiving parameter details from JOB files is not so easy. You might need to use this: -
http://www.15seconds.com/Issue/980513.htm

Or see if this can help in editing the task: -
http://www.jsifaq.com/SUBF/TIP2600/rh2621.htm

Thanks for your reply.
SystmProg
0
 
LVL 11

Author Comment

by:mouatts
ID: 13558448
>Yes. I can understand but retreiving parameter details from JOB files is not so easy.

I know that's why I asked the question :)

Thanks but JT fails with the same error.

I am assuming that the tasks that are present within the task folder are the .job files themselves but because this is a special folder a special tool is needed to access them as files. (Admitedly even if I do there is a chance that they will not be readable)

Steve

0
 
LVL 35

Accepted Solution

by:
Nirmal Sharma earned 2000 total points
ID: 13562833
I got an idea.

Each scheduled task you create is stored as a .job file in the \Windows\Tasks folder. The .job file contains the properties and configuration information for the task. You can create a scheduled task on your computer and then drag the .job object over to a remote computer. After you drag a task from one computer to another, you must update the account information for the task before it will run. Removing a scheduled task removes only the .job file from the schedule. The program file the task runs is not removed from the hard disk.

The above quote copied from MS Link. So final thoughts are to drag-and-drop to another member computer and then retreiving the details.

If that does not work then i need to find a Job parser.

Let me know.

Thanks
SystmProg
0
 
LVL 35

Expert Comment

by:Nirmal Sharma
ID: 13562839
Did you check this: -

Generate a CSV file of scheduled tasks and their credentials.

Using JT.EXE, I scripted Credentials.bat, to generate a CSV file of the scheduled tasks on any Windows 2000, Windows XP, and Windows .NET Server computer. The CSV file contains:

"\\ComputerName","Credentials","JobName".

The syntax for using Credentials.bat is:

Credentials ComputerName ReportFile

where:

ComputerName is the NetBIOS computer name, without leading \\.

ReportFile is the path to the output CSV file.

Credentials.bat contains:

@echo off
if {%2}=={} goto syntax
if not exist \\%1\c$ goto syntax
if not exist %~DP2 goto syntax
setlocal
set server=%1
set server="\\%server:"=%"
set report=%2
if exist %report% del /q %report%
if exist %tmp%\Credentials.tmp del /q %tmp%\Credentials.tmp
for /f "Tokens=*" %%a in ('jt /sm %server% /se p') do set line1=%%a&call :parse1
if exist %tmp%\Credentials.tmp sort %tmp%\Credentials.tmp /o %report%
if exist %tmp%\Credentials.tmp del /q %tmp%\Credentials.tmp
endlocal
goto :EOF
:syntax
@echo Syntax: Credentials ComputerName ReportFile
goto :EOF
:parse1
set line1=%line1:"=%
if not "%line1:~0,22%" EQU "[TRACE] Activating job" goto :EOF
set job=%line1:~24,99%
set job=%job:.job'=%
for /f "Tokens=*" %%b in ('jt /sm %server% /sac "%job%" /gc') do set line2=%%b&call :parse2
goto :EOF
:parse2
set line2=%line2:"=%
if not "%line2:~0,9%" EQU "[TRACE] C" goto :EOF
set cred=%line2:~35,99%
set cred=%cred:'=%
@echo %server%,"%cred%","%job%">>%tmp%\Credentials.tmp

Ref: - http://www.jsifaq.com/SUBL/tip5700/rh5712.htm

0
 
LVL 11

Author Comment

by:mouatts
ID: 13568303
You latter post wouldn't work because the JT fails.

But you were on the right track with your first post.

You can't look at the remote task folder because when you select it windows actually displays the local folder instead!

But what I did was to set up web sharing on the task folder then access it via the web server, which allowed me to copy the files down as text files. They are binary files, however the command line bit is readable.

Thanks for your help
0
 
LVL 35

Expert Comment

by:Nirmal Sharma
ID: 13571613
Oh! Good :-) Glad you solved it.

Thanks!
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

777 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