From: PeterKou on

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-server-help/1350442.htm

http://forums.techarena.in

From: Pegasus [MVP] on


"PeterKou" <PeterKou.4dgs9a(a)DoNotSpam.com> wrote in message
news:PeterKou.4dgs9a(a)DoNotSpam.com...
>
> 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-server-help/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.

From: Grant Taylor on
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. . . .