Trying to run a remote php file as a scheduled task but getting PHP error.
Error is “Could not open input file:
http://www.example.com/example.php “
Tried writing it in various formats:
"C:Program Files (x86)ParallelsPleskAdditionalPleskPHP5php.exe" -f http://www.example.com/example.php
"C:Program Files (x86)ParallelsPleskAdditionalPleskPHP5php.exe" -f http://www.example.com/example.php
Also tried without the –f parameter but all result in the same error message
It does work when running a local domain php file:
"C:Program Files (x86)ParallelsPleskAdditionalPleskPHP5php.exe" -f "C:inetpubvhostsexample.comhttpdocsexample.php"
2
Answers
PHP command line execution only support local files. If you want to fetch remote PHP script output then you can use wget.
NOTE: Make sure wget.exe is installed on your windows server. Contact your hosting provider for the path.
how to create remove scheduled task in plesk control panel
https://www.motherhost.com/help/creating-or-removing-scheduled-tasks-in-plesk/
Creating or Removing Scheduled Tasks in Plesk
On Windows servers, you can set them up to run at certain times by creating a schedule task (which is similar to how you can run cron jobs on Linux servers).
Creating a Scheduled Task in Plesk 10:
You can set up Scheduled Tasks in Plesk by doing the following:
Removing a Scheduled Task in Plesk 10
web hosting india & reseller hosting india