Pattatharasu Nataraj
Pattatharasu Nataraj

Reputation: 248

batch file in windows not calling the php file

I'am trying to call a php file via batch file in windows.

I tried something like

C:\xampp\php\php.exe -f C:\xampp\htdocs\feedback\cron_job.php

and also

@echo OFF
"C:\xampp\php\php.exe" C:\xampp\htdocs\feedback\cron_job.php %*

If I run this batch file, a command prompt opens but the script is not executing and I don't get any errors, should I set php path in environment variables? Any suggestions will be really appreciated.

Upvotes: 1

Views: 122

Answers (1)

You must set php folder to PATH in environment variables (user and system) and everything ok

Upvotes: 1

Related Questions