Two scheduled tasks - one runs every time, the other only sometimes


running vista home premium 32bit sp2. have 2 scheduled tasks, each launching .bat file, 1 set run @ 5:00 pm every day, other set run @ 11:00 pm every day. 5pm task runs every day without fail; 11pm task runs of time, @ unpredictable times fail launch. when fails, task scheduler shows last run time = [last time ran], last run result = operation completed successfully. (0x0), status = ready, , next run time = [blank]. if select task, right-click, open properties, , click ok, next run time changes [tonight @ 11:00pm] , task run -- continues working 4 or 5 weeks, fails again after day or two. once task has failed, never run again without type of manual intervention.

the computer always powered on , logged on both @ 5:00 pm , @ 11:00 pm, time of day cannot reason failure.

settings same on both tasks:

  • general|user account -> mycomputer\me
  • general|run whether user logged on or not -> true
  • general|do not store password -> true
  • general|run highest privileges -> true
  • general|hidden -> false
  • triggers|daily; @ [time] every day; enabled
  • actions|action: start program; details: c:\[filename].bat
  • conditions|start task if computer on ac power -> true
  • conditions|stop if computer switches battery power -> true
  • conditions|[everything else] -> false
  • settings|allow task run on demand -> true
  • settings|if task fails, restart every -> false
  • settings|stop task if runs longer -> 4 hours
  • settings|if running task not end when requested, force stop -> true
  • settings|if task not scheduled run again, delete after -> false
  • permissions on 2 batch files identical -- , not expect related problem; can't see how permissions problem permit file run of time, cause fail occasionally
  • both batch files located in same directory (c:\)

settings different:

  • settings|run task possible after scheduled start missed -> false task works, true task fails (originally, both false, , set true failing task in hopes of fixing problem, no avail)
  • action|edit action|program/script -> task works has 7-character filename (c:\abcdefg.bat), task fails has 9-character filename containing underscore (c:\ab_cdefgh.bat)
  • action|edit action|add arguments -> task works has no arguments, task fails has 2 arguments: 7 letters, 1 letter, separated 1 space. there no quotes or other special characters in parameter string.
  • action|edit action|start in -> task works, blank; task fails, c:\ (no quotes). 

what in world going on here? 1 obvious course of action make settings different same, , see if fixes things. can't delete parameters task has them, though.

any ideas? i'm @ wit's end.

solved.

the vista task scheduler apparently has problems task *names* longer 7 characters. changed name of task, , no other attributes, 9-character name 6-character name more month ago, , has been working flawlessly ever since.

here's additional information others might struggling same issues , receiving same useless "advice" microsoft see in andy qi's response above. if go original post in thread, you'll see had 2 tasks, 1 worked every time , 1 intermittently -- , apparently randomly -- failed. examining windows logs, traced intermittent failures shutdowns of task scheduler service. never able determine reason shutdowns, did determine when scheduler shut down, failing task (with 9-character name) not rescheduled. every single time.

i made numerous duplicates of non-failing task, changing time of day , name of task, giving them names mytask08, mytask009, mytask0010, mytask00011, etc. numbers indicating length of name, through ...0018. enabled of them, , waited each 1 of them run @ least once, , have scheduled next-run-time listed.

then shut scheduler down, in apparently way so: rebooting computer.

less half of them rescheduled when scheduler service restarted: mytask08, mytask00011, mytask0000013, mytask00000014, , mytask000000000018.

mytask009, mytask0010, mytask000012, mytask000000015, mytask0000000016, , mytask00000000017 not rescheduled.

once again -- differences between these tasks names, , time of day run -- within window of 20 minutes. pattern of tasks rescheduled, , ones not, has remained consistent across multiple reboots. tasks names less 9 characters long, or 11, 13, 14, or 18 characters long, rescheduled correctly every time, , tasks names 9, 10, 12, 15, 16, or 17 characters long not rescheduled. every time.

the conclusion pretty clear: there's bug in vista task scheduler prevents rescheduling existing task when scheduler restarts, based on no factors other length of name of task.


when have eliminated impossible, whatever remains, improbable, must truth.





Windows Server  >  Server Manager



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607