2

I'm trying to run a cron job on local server for a Magento site, using some of the following commands in terminal:

*/5 * * * * /bin/sh /Applications/MAMP/htdocs/website.local/cron.sh
*/5 * * * * /bin/bash /Applications/MAMP/htdocs/website.local/cron.sh
*/5 * * * * /usr/bin/php /Applications/MAMP/htdocs/website.local/cron.php
*/5 * * * * /usr/local/bin/php -f /Applications/MAMP/htdocs/website.local/cron.php

I am returned with the following:

-bash: */5: No such file or directory

Can someone please advise how to run a cron job on local server for a Magento site?

2
  • For a one off run you can just access cron.php in your browser. Feb 16, 2015 at 15:01
  • 2
    These are not command line items. They belong in a crontab file. Feb 17, 2015 at 0:52

1 Answer 1

3

The lines you have posted are not direct Bash commands, but Crontab rules. They should not be entered in terminal.

Try entering

crontab -e

in console, and only then pasting this commands to the editor, and saving (Ctrl+x). Or, as frshjb373 commented - you can open cron.php from your webshop's root in web browser.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.