1

I want to run php script through windows task scheduler.
Following is the content of .bat file -

cd C:\test_folder
"C:\Program Files (x86)\PHP\v5.6\php.exe" -f test.php

This .bat file executes successfully if I run it manually but fails in task scheduler showing last run result as 0xFF.

I have multiple versions of PHP installed and have to run test.php on older version. That is why I have to mention full path of php.exe even though PHP environment variable is set.

code_poetry
  • 333
  • 1
  • 6
  • 16

1 Answers1

0

Do any of the folders have restricted access? Try setting it up so that the scripts runs with highest privileges or that the account it's running under has proper access to the folders required and see if that fixes it.

Also, try dropping the "-f".

zelarian
  • 121
  • 1
  • 4