0

When running a task scheduler , it returns 0x80070002 error.

Task is to run php script, when running manually it works fine.

Working environment is windows server 2008, PHP:5.6 Other schedulers are working fine[perl script]

Tsk is set as program:"C:\Program Files (x86)\PHP\php.exe" argument as:C:\domain\httpdocs\schedulers\usage\index.php

siva
  • 1
  • 1
  • 4
  • Please add your code – S.Spieker Mar 18 '16 at 11:20
  • Actually it is used for parsing the AWSTATS log. In another server it is working – siva Mar 18 '16 at 11:22
  • 1
    according to https://msdn.microsoft.com/en-gb/library/windows/desktop/aa383604%28v=vs.85%29.aspx on the user contributed notes that's the error code for "File not Found" – Alex Andrei Mar 18 '16 at 11:29
  • Running through command prompt it is working and i got output – siva Mar 18 '16 at 11:32
  • @siva you should update the question to provide more details, OS version, the full command you are trying to run – Alex Andrei Mar 18 '16 at 11:34
  • Tsk is set as program:"C:\Program Files (x86)\PHP\php.exe" argument as:C:\domain\httpdocs\schedulers\usage\index.php – siva Mar 18 '16 at 11:34
  • You may need to setup the task as having elevated privileges (since windows is a bit odd about accessing stuff in program files). But as @AlexAndrei says, this is not the appropriate place for this question. – apokryfos Mar 18 '16 at 11:40
  • Now i tried to add program as php environment variable, then it is working. I replaced "C:\Program Files (x86)\PHP\php.exe" with 'php' [environment variable]. Then it is working. Thanks for helping@Alex Andrei @apokryfos – siva Mar 18 '16 at 11:48

0 Answers0