cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Cron on Magento 2

Help with Cron on Magento 2

I'm a newbie with Magento 2 so please bear with me.

I've been trying to make the cron run. First, I tried to Create a Password File. I was able to create the directory, but whenever I ran the command to create the password it says:

 

htpasswd command not found

As a workaround, I manually created the password file with the help of this site.

 

Question A: Why can't it find htpasswd command?

Question B: Is it the same if I used the manual method?

Question C: What should be the file name/extension? .htpasswd or just password?

 

--

 

Second, I modified the .htaccess file inside pub folder with the code below so I can run the pub/cron.php file on browser but it's not working.

 

<Files cron.php> AuthType Basic
 AuthName "Cron Authentication"
 AuthUserFile /home/floweraddict123/public_html/fa-private/password/.htpasswd
 Require valid-user</Files>

 

Question D: What's wrong with my .htaccess code?

 

Since it wasn't working, I removed the .htaccess restriction first, then run that file again on browser (twice as suggested here) and I got a blank page both times. I looked in my database and there was a cron_schedule table with the values of today's date, so I guess it worked. I already put back the restriction, but I think the cron is still not properly setup. I guess if I get the answers above then I can try this part again.

 

Question E: Is it just supposed to be blank?

 

--

 

Lastly, I tried to check my existing crontab with this code:

 

crontab -u <Magento file system owner name> -l

 

Question F: Is the file system owner (a user with root privileges) name same as my cPanel username?

 

We're hosted on GoDaddy, if that helps.

 

Apologies for the loads of questions, but looking forward to the replies.

 

Thank you!