When manually calling the cron.php like www.example.com/cron.php , it doesn't runs for the first time.
After that it runs.
Dont know why this happening.
The cron.php does 3 things.
When you run it first time you don't have anything scheduled so nothing is executed. But it schedules jobs for the next time interval.
The second time you run it you have scheduled jobs and they get executed.
To get an idea of what this means, clean the table cron_schedule
, run the cron once and you will see it will be populated with values.
Then run the cron again and you should see the previous jobs with a success status and additional jobs added to the table.
This could be happening because that when it was run the first time, there were outdated scheduled items in your cron_schedule
table - and when you run it the second time - it will run the scheduled tasks.
Do you have it scheduled to run every X minutes?