I have a PHP script. It runs well when I use a browser. It writes an XML file in the same directory. The script takes ~60 seconds to run, and the resulting XML file is ~16 MB.
I am running PHP 5.2.13 via FastCGI on Server 2008 64 bit.
I created a task in task scheduler to run c:\php5\php.exe "D:\inetpub\tools\something.php"
No error returned, but no file created.
If I run this same path and argument at a command line it does not error and does not create the file.
I am doing a simple fopen fwrite fclose to save the contents of a php variable to a .xml file, and the file only gets created when the script is run through the browser.
Thanks
Permissions most likely. Try first to use the RUN AS Administrator option to launch the command prompt then see if that creates your file. If so then you know its just permissions.
What user is running the scheduled task? You will need to give that user proper permissions to write to the folder you would like to create the file in.
Do you have UAC turned on?