#115639 - 2004-03-14 01:14 PM
Re: ScheduleTask()
|
attiahia
Hey THIS is FUN
Registered: 2000-03-27
Posts: 268
|
Error is: [FAIL ] ITaskScheduler::AddWorkItemn hr=0x80070005
As I mentioned, job created but it does not execute at the specified time. Furthermore, when I check the job setting in GUI schedule task I found the Run as setting is still attiahia which is the user id I used to login to the machine. Below is the bat file were redirect output (as Glenn helpful advice)
D:\>D:\jt.exe /SC "Domain Name\Service Account" "Service.123" /SM \\bc301828 /SJ ApplicationName="notepad" Parameters="d:\test.txt" WorkingDirectory="C:\WINDOWS" Comment="cool!" Creator=" Service Account " Priority=Normal MaxRunTime=3600000 DontStartIfOnBatteries=0 KillIfGoingOnBatteries=0 RunOnlyIfLoggedOn=0 SystemRequired=0 DeleteWhenDone=1 Suspend=0 StartOnlyIfIdle=0 KillOnIdleEnd=0 RestartOnIdleResume=0 Hidden=0 TaskFlags=0 /CTJ StartDate=TODAY StartTime=14:46 HasEndDate=0 KillAtDuration=0 Disabled=0 Type=ONCE /SAJ "Exam.job"
[TRACE] Setting account information [TRACE] Setting target computer to '\\bc301828' [TRACE] Setting job's properties [TRACE] Created trigger 0 [TRACE] Adding job 'Exam.job' [FAIL ] ITaskScheduler::AddWorkItemn hr=0x80070005  Thank you
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 483 anonymous users online.
|
|
|