Click here to Skip to main content
15,888,000 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using CHOICE command in below script to include a delay of 120 secs.
But when running it for the first time its going for an infinite delay rather than 120 secs.

The 2nd run and so on is running and completing in time although.

ECHO WAIT START.. %time:~0,2%:%time:~3,2%:%time:~6,2%>> c:\\Systems\SLU_MI\PRE_PROD_IMPORT\SLU_File_Delay_Logs\Net_Retailer_Log_%dt%.txt

CHOICE /T 120 /C ync /CS /D y
ECHO WAIT OVER.. %time:~0,2%:%time:~3,2%:%time:~6,2%>> c:\\Systems\SLU_MI\PRE_PROD_IMPORT\SLU_File_Delay_Logs\Net_Retailer_Log_%dt%.txt

I have to move this script to PRODUCTION after resolving this issue. I cannot let it run for infinite time for first time in PRODUCTION as it will affect the following jobs.

Any help would be greatly appreciated.

Thanks in advance,
Aditya

What I have tried:

Tried steps ...
Other commands to delay time doesnt seems to be working
Posted
Comments
Richard MacCutchan 4-Oct-18 12:44pm    
Impossible to tell. I just tried that and it works fine. It must be something else in your script that is causing the problem.
Aditya_ETL 5-Oct-18 3:19am    
Richard, If you will run it directly through batch script or choice command directly in command prompt it would certainly run fine.
I am running it through external command task. When executed for the first time it keeps on running beyond 120 secs but runs fine on subsequent runs.
Is there any script I need to run single time before running the above script so that it may run as desired in first run itself.
Richard MacCutchan 5-Oct-18 4:09am    
As I said, impossible to tell. You will have to find a way of getting some debug information to help you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900