1

I'm using Magento 2 CE.

We have cron.php in \update\cron.php. Not on Magento Root Folder. I have tried both with URL, both leads to me 404 page.

Example:

http://doamin.com/cron.php
http://doamin.com/update/cron.php

404error while running cronjob in magento

There is no entry in cron_schedule table.

Jackson
  • 9,909
  • 29
  • 128
  • 217

1 Answers1

0

Check your web server vhost. I'm pretty sure you're being held back by Magento's routing rules. Try stick it in the pub folder. It is likely that whilst you're hitting the correct URL the web server is telling you it's a 404 so a random person can't see your crons or access any file that isn't index.php

Timothy Frew
  • 318
  • 2
  • 9
  • Can u give more details please? – Jackson Nov 18 '16 at 08:21
  • Magento2 is a lot more controlling in terms of routing and will return a 404 on any php scripts attempted to be accessed outside of the pub folder within the magento root directory. Try placing your .php file in the pub folder within the root magento webfiles. Then access it like this: http://example.com/script.php – Timothy Frew Nov 18 '16 at 11:04