on 07-06-2015 12:39 PM
Hi all,
I read so many posts about this topic and yet can't find the solution to my problem:
I want to execute a batch job that opens an excel file. The Code I use is:
exec('Batch_jobs\\CS_TOOL_BATCH.bat','', 8);
However the job starts but never finishes and the batch job also does not run.
Would be really appreciated if someone could help me
Thanks
Chris
Chris
Have you tried changing that to
exec('cmd','Batch_jobs\\CS_TOOL_BATCH.bat', 8);
also provide the fully qualified path to the .bat file?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you sure, that your script working correct?
What is the error code of your batch file?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if the batch file open a program that requires user input then, in that case the job will hang since the job runs the process in background you will not see the application or message to acknowledge
so make sure there are no prompts or other application UI showing up etc.
when you run this batch file, if it open another excel in Excel program then check the task manager for process named excel and kill that, the job will continue
Good morning Arun,
the way via vb script seems to be the right way. With some more google help it seems that the issue lies within excel if you want the excel file to open another excel file. I think it is the same issue when running it via task scheduler. So I am working on this A Day in the Life: Excel: Running Excel on Windows Task Scheduler
to see if that is/was the issue. Will keep you posted.
Cheers
Chris
What is supposed to happen when the Excel file opens? If the job is executed as a user other than yourself it may be opening Excel and waiting for some user input on another desktop, which is why it neither fails or completes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.