0

I'm new to using cron job. I don't even know how to write it. I want to write my test.php every hour. My OS is Windows 7. My test.php :

$f=fopen('file.txt','a');
...
fwrite($f,$str);

And I want to run it every hour.

I tried to write in my cmd:

0 * * * * E:/xampp/php E:/xampp/htdocs/cron/test.php &> /dev/nul

But I get syntax error. Can anybody help me? Where I must write this comand? And what is wrong?

Thanks!

stack stack
  • 33
  • 1
  • 4
  • 1
    cron is a unix utility, it is not available natively in Windows. – Alex Howansky Apr 12 '17 at 17:11
  • Basically, unless you install something to be able to run Cron, you need to use the equivalent in Windows, which is task-manager. – junkfoodjunkie Apr 12 '17 at 17:12
  • 3
    Possible duplicate of [What is the Windows version of cron?](http://stackoverflow.com/questions/132971/what-is-the-windows-version-of-cron) – Don't Panic Apr 12 '17 at 17:14
  • Check out http://stackoverflow.com/questions/17442040/setting-up-a-cronjob-in-windows-xampp also. There are quite a few other hits for "cron with xampp php" on Google. – Funk Forty Niner Apr 12 '17 at 17:16

0 Answers0