Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Task Scheduler does not always run

Status
Not open for further replies.

misbrandy

MIS
Jun 12, 2007
41
US
I'm running under Windows XP Professional. I have a series of tasks scheduled to run at 10 minute intervals (I really want step 2 to run after and iff 1 runs, 3 to run after and iff 2 runs, etc., but not knowing how to do that I just put them at 10 minute intervals and hope they all run successfully and in succession.)

Back to the problem. I have them set to run

"every Mon, Tue, Wed, Thu, Fri of every week starting 12/18/2007"

I was out for the last 10 days. Came back to find it ran Mon 12/24, ..., thru Fri 12/28. But not on Mon 12/31 or Tue 1/1.

They still say 'enabled' and have the next run set for today, 1/2, yet have no errors or recorded notes regarding the missed 12/31 and 1/1 days.

Any ideas? Thanks.

 
Is the task scheduler set up to run under your user account? Did your account password expire while you were out of the office? If so, you may need to change the password on the scheduled task.

Joey
CCNA, MCP, A+, Network+, Wireless#
 
Your problem may not be as easy as you thought to remedy. Are the tasks EXE's? Is it the same EXE with different parameters for each task? I have found that the Windows Scheduler may leave the EXE open for the #1 task. If #2 uses the same EXE and the scheduler didn't close the EXE on the first, then the #2 one will fail.

I have a post similar to this. If I learn anything i will pass it on.
 
What trog37 points out is why I always run a batch file in task scheduler which calls any needed EXE files and does some error reporting, etc. For instance,

Code:
@echo off
echo begin calc program %date% >> log.txt
calc.exe
if errorlevel 0 echo calc program completion %date% >> log.txt

That's kind of rough, but you should get the general idea.
 
What does the Task Scheduler log say, have a look at SchedLgU.log in the Windows folder?

Sometimes just re-entering the passwords for the tasks gets it going again if it has previously run successfully.
 
Also are you locking the system or logging out?

Only the truly stupid believe they know everything.
Stu.. 2004
 
Thanks for all the suggestions:
- the passwords are still valid
- trog37 and chipk I think you are on to something; I'll have to work on that. Where can I get help on the coding accepted in .bat files? I'm trying to run a series of 'Crystal Reports' (.rpt code) in conjunction with a piece of software I bought that merges results into excel files and generates notification emails.
- SchedLgU.log says exactly what I saw - it ran 24th-28th, skipped 12/31 and 1/1, and continued 1/2,
- StuReeves - it is working when I am 'logged off' my machine (how I left it when I left for vacation), but I wonder if my PC lost power sometime between 12/29 and 12/31....I presume that would explain it all.

 
Anything you can type at the command line will go in a batch file (that may not be very helpful), but generally, if you're just launching an EXE, it's just a matter of putting the path to the EXE and launching it, e.g.:
Code:
"c:\program files\microsoft office\office12\winword.exe"

If you just put that line in a batch file, it will launch Word (assuming you have Office 2007).

You can find a command line reference here:
You can also find various examples on the web. I like this guy's web page, I used it all the time when I first started scripting:
 
When you say the logging showed a task was skipped, do you have nothing mentioned at all for the task, or is there any error exit code mentioned for the task? Did you get any notification of a missed task from Windows?


Unable to Find a Message for Task Exit Code in Schedlog.txt File

Disk Tools Run by System Agent Pause for User Input

How to troubleshoot scheduled tasks in Windows XP and in Windows Server 2003

Task Scheduler Notifies of Missed Task on Every Startup

This may be worth a look at?

Task Schedule Service issues msg during bootup?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top