Solved

Vista: Task Scheduler failed to start - sometimes

Posted on 2011-03-15
10
2,337 Views
Last Modified: 2012-05-11

I have a standalone PC running Vista. I have a simple scheduled task to run daily just after midday, 12.31 pm to be precise.

It runs a Microsoft Visual FoxPro .exe executable. Mostly it starts as scheduled, but quite often it simply doesn't.

I think it goes Ok if I haven't touched the computer for sveral hours beforehand, and fails [sometimes] if I've been using the computer not long before the scheduled time. Of course, this may have nothing to do with cause of the problem.

The error message on failure is Task Scheduler failed to start "\start gn" task for user "MyName-PC\MyName". Additional Data: Error Value: 2147750687.

The scheduler is workinga sthis from SCHEDLGU.TXT shows...
"Task Scheduler Service"
      Started at 14/03/2011 5:49:08 p.m.
"Task Scheduler Service"
6.0.6001.18000 (longhorn_rtm.080118-1840)
"Task Scheduler Service"
      Exited at 14/03/2011 6:01:25 p.m.
0
Comment
Question by:NEILPH
  • 6
  • 4
10 Comments
 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 35145105
Googling 2147750687 I see this error being reported for other exes and often vbs scripts, so I assume this is happening even before the Foxpro.exe starts and foxpro is out of that puzzle. As it rus often, it's surely not a matter of missing runtime files.

Bye, Olaf.
0
 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 35145116
What you could test: Have another sceduled task as a copy of the failing task and start a simple other exe or cmd file.

Bye, Olaf.
0
 

Author Comment

by:NEILPH
ID: 35153317
Olaf
0
 

Author Comment

by:NEILPH
ID: 35153371
Olaf
I've just done exhaustive testing and it's still a mystery.
1. As you suggested, I created an identical task to run a different exe, [not compiled with Visual FoxPro]. It ran correctly when scheduled.
2. I then temporarily changed the scheduled time for the original problem exe - and it too ran correctly as scheduled.

However, I don't think the problem is solved. You will see in the attached code, the Scheduler log for this task when run today. You can see that it failed when attempting to run at its scheduled time, which is 12.30.10 p.m. Then you can see that I successfully ran it manually. Then you can see that at 2.27 pm it ran successfully as mentioned above when I did a test of the schedule.

You can also see in the code, the parameters I have set for the task.

A clue to the problem is the log message "Launch request ignored, instance already running      Info      92d3fb99-885b-4a5d-9ded-dc5ad200d5c3
Task Scheduler did not launch task "\start gn"  because instance "{92d3fb99-885b-4a5d-9ded-dc5ad200d5c3}"  of the same task is already running."

This doesn't make sense. The task only runs once a day and the computer is turned off overnight. How can another instance of it be running?

What do you think?
************today schedule fails************************************************
Information	17/03/2011 12:31:55 p.m.	110	Task triggered by user	Info	92d3fb99-885b-4a5d-9ded-dc5ad200d5c3
Task Scheduler launched "{92d3fb99-885b-4a5d-9ded-dc5ad200d5c3}"  instance of task "\start gn"  for user "Neil" .
**********************************************************
Information	17/03/2011 12:31:55 p.m.	319	Task Engine received message to start task	(1)	
Task Engine "S-1-5-21-2226433795-3630390700-2128318685-1003:Neil-PC\Neil:Interactive:Highest[1]"  received a message from Task Scheduler service requesting to launch task "\start gn" .
**********************************************************
Information	17/03/2011 12:31:55 p.m.	100	Task Started	(1)	92d3fb99-885b-4a5d-9ded-dc5ad200d5c3
Task Scheduler started "{92d3fb99-885b-4a5d-9ded-dc5ad200d5c3}" instance of the "\start gn" task for user "Neil-PC\Neil".
************************************
Information	17/03/2011 12:31:55 p.m.	200	Action started	(1)	92d3fb99-885b-4a5d-9ded-dc5ad200d5c3
Task Scheduler launched action ""C:\Program Files\Work\allall.exe"" in instance "{92d3fb99-885b-4a5d-9ded-dc5ad200d5c3}" of task "\start gn".
*****************************************
Information	17/03/2011 12:31:56 p.m.	129	Created Task Process	Info	
Task Scheduler launch task "\start gn" , instance "C:\Program Files\Work\allall.exe"  with process ID 1704.
******************************************
Information	17/03/2011 12:33:18 p.m.	107	Task triggered on scheduler	Info	c70fe835-de4c-42be-939b-e72dbec818e6
Task Scheduler launched "{c70fe835-de4c-42be-939b-e72dbec818e6}"  instance of task "\start gn" due to a time trigger condition.
******************************************
Warning	17/03/2011 12:33:18 p.m.	322	Launch request ignored, instance already running	Info	92d3fb99-885b-4a5d-9ded-dc5ad200d5c3
Task Scheduler did not launch task "\start gn"  because instance "{92d3fb99-885b-4a5d-9ded-dc5ad200d5c3}"  of the same task is already running.
******************************************
Error	17/03/2011 12:33:18 p.m.	101	Task Start Failed	Launch Failure	
Task Scheduler failed to start "\start gn" task for user "Neil-PC\Neil". Additional Data: Error Value: 2147750687.
*****************************************
SCHEDULED TASK HAS FAILED

**************run task manually from Scheduler*********************************
Information	17/03/2011 1:10:24 p.m.	201	Action completed	(2)	92d3fb99-885b-4a5d-9ded-dc5ad200d5c3
Task Scheduler successfully completed task "\start gn" , instance "{92d3fb99-885b-4a5d-9ded-dc5ad200d5c3}" , action "C:\Program Files\Work\allall.exe" with return code 0.
******************************************
Information	17/03/2011 1:10:24 p.m.	102	Task completed	(2)	92d3fb99-885b-4a5d-9ded-dc5ad200d5c3
Task Scheduler successfully finished "{92d3fb99-885b-4a5d-9ded-dc5ad200d5c3}" instance of the "\start gn" task for user "Neil-PC\Neil".
********************************************
MANUALLY RUN TASK HAS SUCCEEDED

*************test scheduled run**************************************************
Information	17/03/2011 2:27:10 p.m.	107	Task triggered on scheduler	Info	cd0ead6d-134d-4f9d-9021-e5c273d72dfb
Task Scheduler launched "{cd0ead6d-134d-4f9d-9021-e5c273d72dfb}"  instance of task "\start gn" due to a time trigger condition.
***************************************************
Information	17/03/2011 2:27:10 p.m.	200	Action started	(1)	cd0ead6d-134d-4f9d-9021-e5c273d72dfb
Task Scheduler launched action ""C:\Program Files\allall.exe"" in instance "{cd0ead6d-134d-4f9d-9021-e5c273d72dfb}" of task "\start gn".
****************************************************
Information	17/03/2011 2:27:10 p.m.	319	Task Engine received message to start task	(1)	
Task Engine "S-1-5-21-2226433795-3630390700-2128318685-1003:Neil-PC\Neil:Interactive:Highest[1]"  received a message from Task Scheduler service requesting to launch task "\start gn" .
*************************************************
Information	17/03/2011 2:27:10 p.m.	100	Task Started	(1)	cd0ead6d-134d-4f9d-9021-e5c273d72dfb
Task Scheduler started "{cd0ead6d-134d-4f9d-9021-e5c273d72dfb}" instance of the "\start gn" task for user "Neil-PC\Neil".
***********************************************
Information	17/03/2011 2:27:10 p.m.	129	Created Task Process	Info	
Task Scheduler launch task "\start gn" , instance "C:\Program Files\Work\allall.exe"  with process ID 916.
***********************************************
Information	17/03/2011 2:27:27 p.m.	201	Action completed	(2)	cd0ead6d-134d-4f9d-9021-e5c273d72dfb
Task Scheduler successfully completed task "\start gn" , instance "{cd0ead6d-134d-4f9d-9021-e5c273d72dfb}" , action "C:\Program Files\allall.exe" with return code 0.
************************************************
Information	17/03/2011 2:27:27 p.m.	102	Task completed	(2)	cd0ead6d-134d-4f9d-9021-e5c273d72dfb
Task Scheduler successfully finished "{cd0ead6d-134d-4f9d-9021-e5c273d72dfb}" instance of the "\start gn" task for user "Neil-PC\Neil".
*****************************************
SCHEDULED TASK HAS  SUCCEEDED



SETTINGS FOR THIS TASK
General
Run only when user logged in 
   Note: if I change this to "Run whether user is logged in or not", 
   I get this error message when trying to save the change: 
   "User account restriction error. Possible reasons are that 
   blank passwords not allowed, or that a policy restriction has 
   been enforced'
Run with highest privileges

Trigger
Daily 12.30.10 p.m. Enabled

Actions
start a program "C:\Program Files\Squirrel\Grab-a-Site\goos.dir\Work\allall.exe"

Conditions
Wake the computer to run this task
   Note: does this mean that the task won't start if the computer isn't asleep?

Settings
Allow task to run on demand
Run task as soon as possible after a scheduled task is missed
Stop the task if it runs longer than 2 hours
If the running task does not stop when requested, force it to stop

Open in new window

0
 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 35154109
From the log it looks like the task was triggered manually at 12:31:55 pm and via time trigger on 12:33:18 pm, about two minutes later. This most probably means the task still runs.

Bye, Olaf.
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:NEILPH
ID: 35160536
Mmm. I see what you mean. What usually happens is that if the task hasn't started within a couple of minutes of when scheduled I start it manually [if I'm in the room].

It looks like maybe it is normal for the task to start later than scheduled e.g. 12:33:18 p.m.      when scheduled as 12.30.10 p.m.

Today, I'll leave it for 15 minutes after the scheduled time. If it hasn't started then I'll try it manually. I'll let you know what happens.

Thanks so far.
0
 

Author Comment

by:NEILPH
ID: 35161785
Olaf The scheduled event ran OK today so I couldn't learn about the problem by studying the log. I do know that it will fail again as in the past. I can give you points now to sign off, or if you wouldn't mind waiting a week I'll see if it fails within that time.

I am puzzled that the log shows that the task triggered after I started it manually, (and that it triggered 3.18 minutes after scheduled). The test I have been using for trigger failure is to look at the Next Runtime and Last Runtime dates. If Next is tomorrow and Last is yesterday I have been assuming that today's trigger has failed.

In future when I think it has failed I'll also check the log - and give it 5 minutes past the trigger time , before deciding the trigger has failed.

I'll get back to you in a week at latest - unless you'd prefer your points now.
0
 
LVL 29

Accepted Solution

by:
Olaf Doschke earned 500 total points
ID: 35171382
I don't care much about points personally. That's more a question about the quality of the knoledgebase, the validity of a solution. I'm convinced a foxpro exe has nothing special about it to act different from other exes in regard to being scheduled.

OVerall this means, I'm patient and wait.

Bye, Olaf.
0
 

Author Comment

by:NEILPH
ID: 35178588
Thanks Olaf. I'll diary to get back to you at the end of the month if it hasn't failed again by then.
0
 

Author Closing Comment

by:NEILPH
ID: 35311207
Olaf

My scheduled task hasn't failed again since I last contacted you.

I'm not sure what the initial cause was. However, since then I have had the task start unexpectedly. I then noticed that I had ticked "Run task as soon as possible after a scheduled start is missed."

Maybe this was a factor in the previous failures. You may recall that in the log I showed you, the task was going when I thought it wasn't. Perhaps it was still going from the previous day, and waiting for the opportunity to run the .exe.

I've since un-ticked that and no problems so far.

Thanks again.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
Windows 10 is here and for most admins this means frustration and challenges getting that first working Windows 10 image. As in my previous sysprep articles, I've put together a simple help guide to get you through this process. The aim is to achiev…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now