Re: Windows XP Task Scheduler
- From: swtbase@xxxxxxxxx
- Date: Tue, 24 Jun 2008 08:45:28 -0700 (PDT)
On Jun 24, 1:38 am, blackpowder <blackpow...@xxxxxxxxxxxxxxxx> wrote:
Sorry, I should have put this in my first post, but anytime I try and
schedule a task as the currently logged in user the task never executes.
When taking a look at the log file this is what it shows:
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.
If I take and copy the contents of the run line within the task, and then
open up a run line and paste that same line in there, it executes without any
issues, so I know the pathing is correct.
I am running Windows XP SP2 on my dev box.
Any information on how I could resolve that error message above would be
great.
Thanks,
William
"blackpowder" wrote:
Hi Everyone -
I am having several problems programatically creating a windows task
scheduler job via C++. I have tried to implement the registration and
schedule of the task in three different ways and in all cases I don't have
one solution that works well.
First off I have an application that when ran it is suppose to create a task
entry that will kick off in a couple of hours, then if the user reboots there
system before that time period then on reboot we rescheduled the task to run
in 15 minutes. In all 3 implementations I run into issues with each of them
in performing one of the requirements.
1. First implementation I used the windows task scheduler api's and set the
task to run as the system account. The problem is when my schedule task is
set to execute it executes, but doesn't run properly because it is being ran
under the context of the system account, which doesn't work because our
application UI does not show up.
2. Second implementation I tried to register the windows task using the
currently logged in user account, but everytime it is time for the task to
execute we are getting the error task didn't run, which looks like it comes
down to permission issues, however we have set the flag only run when user is
logged in which then grays out the set password option. We do not have the
users password so I am not sure what else we can do to get around this.
3. The third implementation I tried to use WMI to schedule the task and
this works great while the user is logged in however on reboot, connecting to
the WMI doesn't work since our application executes to quickly to schedule
the task, thus causing issues.
I would rather try and get the first or second implementation working. Does
anyone have any ideas or suggestions on what I can do to get around these
problems?
Thanks,
William- Hide quoted text -
- Show quoted text -
William,
It seems that its a problem with your OS rather than with your app. I
guess the error message is saying that somehow your security database
has corrupted. Do other similar tasks run well? Try searching through
'Windows Security Center' for how to fix it. Or a google search?
Good Luck
.
- References:
- RE: Windows XP Task Scheduler
- From: blackpowder
- RE: Windows XP Task Scheduler
- Prev by Date: Re: Please Help!!! - CAsyncSocket::OnReceive (Part 2)
- Next by Date: Re: CoInitialize/CoUninitialize
- Previous by thread: RE: Windows XP Task Scheduler
- Next by thread: RE: Windows XP Task Scheduler
- Index(es):
Relevant Pages
|