Discussion:
schedulled task never ends launchning a batch
(too old to reply)
PeterKou
2010-07-02 07:51:36 UTC
Permalink
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 schedule
the cmd.exe is never closing down.

Any clue

--
PeterKo
-----------------------------------------------------------------------
PeterKou's Profile: http://forums.techarena.in/members/239557.ht
View this thread: http://forums.techarena.in/windows-server-help/1350442.ht

http://forums.techarena.i
Pegasus [MVP]
2010-07-02 09:37:07 UTC
Permalink
Post by PeterKou
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
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.
Grant Taylor
2010-07-02 15:12:23 UTC
Permalink
Post by Pegasus [MVP]
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. . . .

Loading...