cancel
Showing results for 
Search instead for 
Did you mean: 

Struggling Setting up Cron Jobs on MAMP Localhost

SOLVED

Struggling Setting up Cron Jobs on MAMP Localhost

Hi All,

 

Firstly thank you for all the help you guys have provided so far.

 

Quick one - Got Magento2 up and running on my MAMP server. 

 

I am trying to set up cron so I can connect extensions and complete the set up.

 

On terminal I type in: php -v  to see what version of php I am using. Details below:

 

My PHP Levels

-----------

Gregs-MacBook-Pro:test gregclayton$ php -v

PHP 7.2.20 (cli) (built: Jul 16 2019 16:28:40) ( NTS )

Copyright (c) 1997-2018 The PHP Group

Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Gregs-MacBook-Pro:test gregclayton$

 

When I then go to my magento2 site folder (test) on terminal I use the following command:

 

php bin/magento cron:install [--force]

 

Then I get this error which is in bright red so it wont allow me to run the command.

 

Too many arguments, expected arguments "command". cron:install [-f|--force]

 

Ive attached a photo as well.

 

Screen Shot 2019-07-31 at 22.24.24.png

 

^ can anyone advise? Dying to get cracking on with the front end build of this magento2 store but until I can get cron running I dont no what to do. 

 

Thanks for any help guys! 

Greg

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Struggling Setting up Cron Jobs on MAMP Localhost

Hello @gregoryclayton 

 

Use below shared command:

 

php bin/magento cron:install -f
or 
php bin/magento cron:install --force

Do not use brackets []

Manish Mittal
https://www.manishmittal.com/

View solution in original post

11 REPLIES 11

Re: Struggling Setting up Cron Jobs on MAMP Localhost

Hello @gregoryclayton 

 

Use below shared command:

 

php bin/magento cron:install -f
or 
php bin/magento cron:install --force

Do not use brackets []

Manish Mittal
https://www.manishmittal.com/

Re: Struggling Setting up Cron Jobs on MAMP Localhost

Legend. Thankyou so much for the help so far. 

 

So the above answer did infact create my crons.. Many thanks!

 

Ive gone to try and insall my first extension and now I get this error:

 

Found non-writable path(s):
/Applications/MAMP/htdocs/test/.github
/Applications/MAMP/htdocs/test/.htaccess.sample
/Applications/MAMP/htdocs/test/.php_cs.dist
/Applications/MAMP/htdocs/test/.travis.yml
/Applications/MAMP/htdocs/test/.user.ini

 

I believe once this is done I should be finally good to go. Any idea what command I need to use to adjust the writable paths here?

 

Thanks again for your help so far. Much appreciated

Re: Struggling Setting up Cron Jobs on MAMP Localhost

Try chmod -R 0777 /Applications/MAMP/htdocs/test

Manish Mittal
https://www.manishmittal.com/

Re: Struggling Setting up Cron Jobs on MAMP Localhost

Hi Manish,

 

Still struggling mate. Ive attached a screen shot of what the extension manager says and also what I did in Terminal.

 

Screen Shot 2019-08-01 at 11.56.29.png

 

^ Why it failed

 

Screen Shot 2019-08-01 at 11.57.09.png

 

^ My first terminal which when I hit enter did nothing.

 

Screen Shot 2019-08-01 at 11.57.13.png

 

Second terminal when I just pasted cmod -R 0777 in the directory itself /test rather than the full path on the previous screen grab.

 

Any ideas? I can almost smell the finish line ready to start my frontend editing lol!

 

Thanks again

greg

Re: Struggling Setting up Cron Jobs on MAMP Localhost

Sorry to bump ^ Just checking if anyone has any ideas on the above.

 

Thanks again

Greg

Re: Struggling Setting up Cron Jobs on MAMP Localhost

You can try with sudo:

 

sudo chmod -R 0777 /Applications/MAMP/htdocs/test

 

can not run directly chmod -R 0777, you have to pass folder or file path

Manish Mittal
https://www.manishmittal.com/

Re: Struggling Setting up Cron Jobs on MAMP Localhost

Hi,

 

Still no joy. Attached my screen shot below:

 

Screen Shot 2019-08-02 at 14.32.05.pngScreen Shot 2019-08-02 at 15.08.43.png

 

Any more advice? Sorry again for all the questions - Just wanna get started!!

Re: Struggling Setting up Cron Jobs on MAMP Localhost

Hello @gregoryclayton 

 

As a temporary solution you can disable it:

Locate the line:

And replace it with the new one:

$setupCheck = ['success' => 1];

It is for an installation only.

Manish Mittal
https://www.manishmittal.com/

Re: Struggling Setting up Cron Jobs on MAMP Localhost

Hi Manish,

 

Thank you for all your help so far.

 

Still not working though. Still got the errors regarding htaccess.Is there any documenation about this on the magento2 area? Surely this must effect lots of people when they install it?

 

Thanks