Help needed to set up this command in my Xampp windows server
0 * * * * cd C:/xampp/htdocs/plugins/moviefeed/ && php cron.php
C
I'll add nothing new but just a test case. Using the Task Scheduler GUI would be troublesome/unnecessary for a simple cron job, so this demo uses .bat files. What the demo does is just increment the number in the "counter.txt" by 1 every minute.
Created a "cron" folder in "htdocs" with these files:
Contents of the files:
counter.txt
0
index.php
schtask_add.bat
@echo off
schtasks /Create /TN XAMPP /TR "C:/xampp/php/php-win.exe C:/xampp/htdocs/cron/index.php" /SC MINUTE /MO 1
pause
schtask_del.bat
@echo off
schtasks /Delete /TN XAMPP /F
pause
schtask_query
@echo off
schtasks /Query /TN XAMPP
pause
Tested with XAMPP 7.1.11 on Windows 10 (64-bit).
Schtasks.exe | Microsoft Docs
Schtasks - Scheduled tasks - Windows CMD - SS64.com
PHP: CLI and CGI - Manual (php.exe vs php-win.exe)