I'm trying to run the batch script below every hour through task scheduler.
"C:\php\php.exe" -f "C:\PHP Scripts\PipedriveReadDeals.php"
Copy csv1.csv \\APACHE\csv1.csv
DEL "csv1.csv"
Copy csv2.csv \\APACHE\csv2.csv
DEL "csv2.csv"
Copy csv3.csv \\APACHE\csv3.csv
DEL "csv3.csv"
Copy csv4.csv \\APACHE\csv4.csv
DEL "csv4.csv"
Copy csv5.csv \\APACHE\csv5.csv
DEL "csv5.csv"
When I run the batch script normally, it works fine. It executes the php
script, copies the files to the specified location, and delete the specified files, but when I run the script from Task Scheduler
in Windows 8
, the php
script that windows is calling doesn't create the csv files, and thus, those csv files can't be copied or deleted.
I chose Run with highest privileges
for the task, and it still won't work.
Any insight as to how to get this batch script to run every hour properly with Task Scheduler
would be greatly appreciated.