1
votes

I have a batch file that executes a php script which fetches files(pdfs) from the backend and saves locally. I have tried executing the batch file through command prompt and it works perfectly.

But when I setup a Windows Task Scheduler to run this batch, it is not working. The command prompt window pop ups and displays alot of unreadable characters and hangs there.

I have also chosen the option for the bat to run with highest privileges but no difference.

Any idea what's wrong?

1
maybe that if you provide more infos you will have more responses ... what is in your batch ? how do you call it in the scheduler? what is the output etc.Loïc MICHEL
When you call your batch file from the task scheduler, do you call it as cmd /c "path\to\batch.bat" or just as "path\to\batch.bat"? Does calling it the other way make any difference?rojo

1 Answers

0
votes

My mistake. Managed to solve it. The path to php was not set properly.

Now it is fine.