I need to run a php script at midnight every night on my server. On linux, I installed cron to work, but I am stuck on a Windows system.
I know that I need to configure the task using the Windows Task Scheduler and that the task will have to run the .bat file, which in turn will launch the php file, but I got stuck trying to write the .bat file.
I currently have:
@echo off REM this command runs the nightly cron job start "C:\Program Files (x86)\PHP\v5.3\php.exe" -f C:\inetpub\wwwroot\sitename\crons\reminder-email.php
But when I try to manually run the .bat file to check it, I get a Windows warning saying
“Windows cannot find“ -f. ”Make sure you type the name correctly, then try again.
What did I miss?
windows php batch-file
evilscary
source share