Skip to Content
0

script run to open an application

Jul 20, 2017 at 01:41 PM

40

avatar image

hi guys I have a script which runs fine from command line and by creating .bat files as well.. but when I am running same script from dataservices, it is not doing anything, kept running..

script needs to open the Snap11.exe and download the data and close the Snap11.exe.

see the script below:-

.bat file

@echo off
start cmd.exe /c F:\Snap_11\Snap11.exe /S "test1.mdf" /IR && timeout 5 && "F:\Snap_11\Snap11.exe" /S "test1.mdf" /DB "test2"

cmd script

F:\Snap_11\Snap11.exe /S "test1.mdf" /IR && timeout 5 && "F:\Snap_11\Snap11.exe" /S "test1.mdf" /DB "test2"

data services script:-

exec('cmd', 'F:\\Snap_11\\Snap11.exe /S "test1.mdf" /IR && timeout 5 && "F:\\Snap_11\\Snap11.exe" /S "test1.mdf" /DB "test2"');

please help me to find an error.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

leo dec Jul 20, 2017 at 03:17 PM
0

Any help please..

Share
10 |10000 characters needed characters left characters exceeded
Ravi kiran Pagidi Jul 20, 2017 at 06:18 PM
0

Hi leo dec,

Use print before exec function to see the error in the log. like print(exec()).

try creating a .bat file wit your command and try calling the bat file in the exec function like below.

exec('cmd', 'C:\test.bat', 8)

Thanks,

Ravi kiran.

Share
10 |10000 characters needed characters left characters exceeded
leo dec Jul 21, 2017 at 08:18 AM
0

Hi Ravi

I tried executing the .bat file as per your instructions, but nothing happens, job gets stuck and after aborting the job manually no error shown in error log file in management console..

same result if I use print before exec function as well

regards

Share
10 |10000 characters needed characters left characters exceeded