Page 1 of 1 1
Topic Options
#72773 - 2003-01-30 06:29 PM Problem with SCHEDULETASK()
whaler Offline
Fresh Scripter

Registered: 2002-11-27
Posts: 20
Loc: Mississauga, Canada
I have been trying to use the UDF posted by Sealeopard at the following:

SCHEDULETASK()

I am continually getting this error.

code:
[TRACE] Setting target computer to '\\navacbzw1'
[FAIL ] ITaskScheduler::SetTargetComputer hr=0x80070005

Does anyone know what this error refers to, why it is failing?

Thanks,
Shawn

Top
#72774 - 2003-01-30 06:44 PM Re: Problem with SCHEDULETASK()
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
That's an 'Access Denied' error. Make sure you're using a valid (local admin) user account and that the scheduling/scheduled account has access to the scheduled files and the remote computer.

[ 30. January 2003, 18:47: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#72775 - 2003-01-30 07:57 PM Re: Problem with SCHEDULETASK()
whaler Offline
Fresh Scripter

Registered: 2002-11-27
Posts: 20
Loc: Mississauga, Canada
Thanks for your help! Once I gave the "system" access to the file, I now get to this point:

code:
[TRACE] Created trigger 0
[TRACE] Setting account information
[TRACE] Setting job's properties
[TRACE] Setting target computer to '\\49.3.26.94'
[TRACE] Adding job 'test.job'
[FAIL ] ITaskScheduler::AddWorkItemn hr=0x80070005

[Confused]

Any ideas?
Thanks,
Shawn

Top
#72776 - 2003-01-30 08:00 PM Re: Problem with SCHEDULETASK()
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Do not use the SYSTEM account for anything! It has serious limitations and should not be used to scheudle tasks. Use a real local or domain account instead, preferably a local/domain administrative account.
_________________________
There are two types of vessels, submarines and targets.

Top
#72777 - 2003-01-30 08:01 PM Re: Problem with SCHEDULETASK()
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
"system" probably won't do. You likely need to have domain rights.

Mind you, this is conjecture because you haven't said what the task does.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#72778 - 2003-01-30 08:10 PM Re: Problem with SCHEDULETASK()
whaler Offline
Fresh Scripter

Registered: 2002-11-27
Posts: 20
Loc: Mississauga, Canada
Well I am confused. Better explain a bit more. [Smile] I need a Kix file run on a database server.

I have users that will click on a link from a web site. This downloads code to their local system. One of the files called would be my "schedule" kix file which would in turn create a scheduled taks to execute a kix script on the database server.

Now, on the DB server, the "Task Scheduler" is running, as the localsystem account. I have a batch file on the D drive which executes my KIX script. The local Administrator has access to all these files, and this is the ID I am using in the original "schedule" kix to try and create the job.

When I test though, I am now getting the error that I posted above.

Shawn

Top
#72779 - 2003-01-30 08:35 PM Re: Problem with SCHEDULETASK()
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
The 'Task Scheduler' is a service that runs under the SYSTEM account. Your tasks are scheduled through the task scheduler in such a way that they run under a specific user account that you will need to provide. Additionally, the JT.EXE will access the remote Task Scheduler service and thus will also require appropriate permissions.

I am normally running JT.EXE under an account that has local administrative rights on the remote computer that I target.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1607 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.055 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org