scheduler set-up "bad data passed"

I am trying to set-up the schedulers and i ahve done the following

  1. Commented out the lines on the cron.php as required.
  2. Created a batch file, code below:

cd..
cd..
cd xampp
cd php
pause
php.exe -f C:\xampp\htdocs\cron.php
pause

After executing this i get the following
Bad data passed in;

Any help much appreciated.

Using Windows Server
Php v7

Try this instead


cd /D c:\xampp\htdocs
php -f cron.php

And don’t comment out any lines in cron.php, why are you doing that?

Your above line didnt work however about commenting the lines from Cron.php. I thought you was supposed to comment out the first couple of lines which say something like ’ cron.php is cli '. Is this wrong?

Yes, that is wrong. Those instructions are for people using external services to call their cron jobs through the web server. I don’t recommend it.

The correct batch should be this:


cd /D c:\xampp\php
php -f c:\xampp\htdocs\cron.php
1 Like

is your problem is solved …?

i did this same but still facing same problem

cd /D c:\xampp\php
php -f ../htdocs/cron.php

This will work for sure.