I've been trying to run a php file using window task scheduler. I've tried using the .bat file, but it won't work.
Here's what I've done:
- I've created a task "Download Image"
I've created a .bat file, and the content is:
"C:\xampp\php\php.exe" -f "D:\server\newxml\download.php";
The php file that I want to run is:
ini_set('max_execution_time', 300); $doc = simplexml_load_file('xml_edit_feeds.xml'); foreach ($doc->xpath("//item") as $item) { $name = $item->productname; $realname = preg_replace('/\s/', '',$name); $url = $item->thumbnail_url; $img = 'D:/server/newxml/imagethumbnail/'.$realname.'.png'; $filename = 'D:server/newxml/imagethumbnail/'.$realname.'.png'; file_put_contents($img, file_get_contents($url)); } ?>
Is there something wrong from what I did? Thank you for your help

