Magento Cron on shared hosting (hostinger)

475 Views Asked by At

How can i set up magento cron properly on shared hosting servers, where execution is prohibited via SSH?

i.e Setting up using crontab doesn't work. The temporary solution i have is the following:

*/10 * * * * php public_html/bin/magento cron:run
*/15 * * * * php public_html/bin/magento cache:clean
*/5 * * * * php public_html/bin/magento indexer:reindex

I have inserted these into the cron job section in cpanel. This is probably a hideous way of tackling this problem, but atleast indexers are reindexed automatically right now. But when the site goes public, this needs to be set up correctly.

Running Magento 2.1.17

1

There are 1 best solutions below

2
loic_amphibee On

Your cron task for the scheduler is fine, but the other two are a bit weird.

Why do you need to clear your cache & reindex so often ?