1.

Solve : another script runed by batch goes into loop?

Answer»

I have problem when first batch start second batch than that second batch is runned fev times with 1 second appart.
Have anyone idea what can cause that and how to prevent that, so second script is RUN only once?Can you share what your batch instructions look like so we can SEE what your doing to help you correct the problem.You're Help requests lack details most of the time....
You have been here long enuff to know the drill by now...

Just sayin.I have this script in one of batch which search and call copy_sendmail.bat
Everytime it runs I get log FILE run_bats_alarm.txt
When I check run_bats_alarm.txt I see it was runned 6 times for 1 second appart

Code: [Select]echo start run bats %date% %time% >> run_bats_alarm.txt

set startdir=%cd%
for /d %%i in (*) do (
cd %%i
if exist "copy_sendmail.bat" call "copy_sendmail.bat"
cd %startdir%
)

In next bat file I have this at the BOTTOM of batch

Code: [Select]start cmd /c "\\cpisrv1\skleda\programi\progscr\logiranje\log.bat"

in file log.bat I have also this for logs
Code: [Select]echo start run log %date% %time% >> log.txt
and when I check I check log.txt I see it is runned EVERY fev seconds or minutes, like this hour_minutes_seconds
18_20_22
18_20_31
18_20_56
18_22_02 
18_24_30
18_35_21



Discussion

No Comment Found