Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Re: schedulled task never ends launchning a batch

Reply
Thread Tools Display Modes

Re: schedulled task never ends launchning a batch

 
 
Pegasus [MVP]
Guest
Posts: n/a

 
      07-02-2010


"PeterKou" <> wrote in message
news:...
>
> Hi,
>
> I use a batch like
> @echo off
> start engine.exe /I1
> exit
>
> and schedule the batch. When executed manually the batch is executed,
> cmd.exe closes down. When the batch is executed by the 2008 scheduler
> the cmd.exe is never closing down.
>
> Any clue?
>
>
> --
> PeterKou
> ------------------------------------------------------------------------
> PeterKou's Profile: http://forums.techarena.in/members/239557.htm
> View this thread:
> http://forums.techarena.in/windows-s...lp/1350442.htm
>
> http://forums.techarena.in
>


Try this variant:
@echo off
echo %date% %time% %UserName% >> c:\PeterKou.txt
start /b engine.exe /I1 1>> c:\PeterKou.txt 2>>&1
echo %date% %time% (End) >> c:\PeterKou.txt

When examining the log file c:\PeterKou.txt then you will probably find that
the task is unable to run engine.exe. When writing batch files it is
imperative to fully qualify all file names with drive and path.

 
Reply With Quote
 
 
 
 
Grant Taylor
Guest
Posts: n/a

 
      07-02-2010
On 07/02/10 04:37, Pegasus [MVP] wrote:
> When examining the log file c:\PeterKou.txt then you will probably find
> that the task is unable to run engine.exe. When writing batch files it
> is imperative to fully qualify all file names with drive and path.


I've run in to the OP's problem before. Unfortunately I don't remember
exactly what I did to resolve it.

I want to say that the problem had to do with the batch file not
returning an error level (or something like that) properly to satisfy
the task scheduler.

I will go back and look at some batch files I've got running and see if
I see any thing obvious.



Grant. . . .
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Task scheduler: have a task only run briefly? Rick Windows Vista General Discussion 0 05-29-2010 03:26 PM
batch File Raghuveer Alapati Windows Server 0 05-25-2010 12:39 PM
Task scheduler and sleep mode - Sleeps too soon Adam Windows Vista Performance 6 01-07-2009 04:49 AM
Task Scheduler losing saved credentials Quilnux Windows Vista Administration 12 01-13-2008 02:38 AM
Can't display or change a task with schtasks.exe clayga Windows Vista Administration 0 08-03-2007 06:16 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59