Scheduler Problem
-
I am trying to create a scheduler using ITaskScheduler but I am struck up while running the job. I am able to create the job but it is throwing an error while saving the job at hr = pIPersistFile->Save(NULL,TRUE); The Error that is getting logged is The attempt to retrieve account information for the specified task failed; therefore, the task did not run. Either an error occurred, or no account information existed for the task. The specific error is: 0x8004130f: No account information could be found in the Task Scheduler security database for the task indicated. I am using XP , do anyone has any idea why it is failing while saving?
-
I am trying to create a scheduler using ITaskScheduler but I am struck up while running the job. I am able to create the job but it is throwing an error while saving the job at hr = pIPersistFile->Save(NULL,TRUE); The Error that is getting logged is The attempt to retrieve account information for the specified task failed; therefore, the task did not run. Either an error occurred, or no account information existed for the task. The specific error is: 0x8004130f: No account information could be found in the Task Scheduler security database for the task indicated. I am using XP , do anyone has any idea why it is failing while saving?
Did you call
IScheduledWorkItem::SetAccountInformation()
?--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ I work for Keyser Söze
-
Did you call
IScheduledWorkItem::SetAccountInformation()
?--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ I work for Keyser Söze
Yes , i pass both the parameters username and password but the still same error exists. I went through the microsoft site , it seems this was a bug in earlier XP versions but that fix was made. I am using XP version 2002 service pack 2, is this the version in which fix is made or not? Thanx for reply!!
-
I am trying to create a scheduler using ITaskScheduler but I am struck up while running the job. I am able to create the job but it is throwing an error while saving the job at hr = pIPersistFile->Save(NULL,TRUE); The Error that is getting logged is The attempt to retrieve account information for the specified task failed; therefore, the task did not run. Either an error occurred, or no account information existed for the task. The specific error is: 0x8004130f: No account information could be found in the Task Scheduler security database for the task indicated. I am using XP , do anyone has any idea why it is failing while saving?
Can you create the job manually, and have it run?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Can you create the job manually, and have it run?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
Yes, if i go to that job and specify the password in the properties, the job runs fine , its just that through setAccountInformation I am not able to run that job? It is picking my default Windows login and not the userID I specify in setAccountInformation. What could be the reason?
-
Yes, if i go to that job and specify the password in the properties, the job runs fine , its just that through setAccountInformation I am not able to run that job? It is picking my default Windows login and not the userID I specify in setAccountInformation. What could be the reason?
How are you using the
SetAccountInformation()
method?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
How are you using the
SetAccountInformation()
method?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
This is the flow : hr = pITask->SetApplicationName(pwszApplicationName); TCHAR pszName[500] = "User"; TCHAR pszPwd[500] = "Password"; hr = pITask->SetAccountInformation((LPCWSTR)pszName, (LPCWSTR)pszPwd); hr = pITask->CreateTrigger(&piNewTrigger,&pITaskTrigger); hr = pITaskTrigger->SetTrigger (&pTrigger); hr = pIPersistFile->Save(NULL,TRUE); // Here Error is getting Logged in SchedLgU
-
This is the flow : hr = pITask->SetApplicationName(pwszApplicationName); TCHAR pszName[500] = "User"; TCHAR pszPwd[500] = "Password"; hr = pITask->SetAccountInformation((LPCWSTR)pszName, (LPCWSTR)pszPwd); hr = pITask->CreateTrigger(&piNewTrigger,&pITaskTrigger); hr = pITaskTrigger->SetTrigger (&pTrigger); hr = pIPersistFile->Save(NULL,TRUE); // Here Error is getting Logged in SchedLgU
What is the value of
hr
?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
What is the value of
hr
?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
I think that value resolves to
SCHED_E_SERVICE_NOT_RUNNING
.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne