These are instructions for setting up a cron job on your localhost using MAMP on a Mac.

  1. In Terminal type crontab -e. This allows you to add a cron job, using the vim editor.

  2. Press i on your keyboard to go into vim's insert mode.

  3. Type in you cron command. For example, to run at minute 5 of every hour using curl, use
    5 * * * * /usr/bin/curl --silent --compressed http://localhost:8888/cron.php

  4. But to run every 5 minutes, use:
    */5 * * * * /usr/bin/curl --silent --compressed http://localhost:8888/cron.php

  5. Note that if you are not using MAMP's default 8888 port, you should leave that off.

  6. While in insert mode you can use the arrows and delete keys as you would normally.

  7. Press escape key to exit vim's insert mode.

  8. Type ZZ (Must be capital letters -- saves the file and exits crontab).

  9. Verify the cron job details by typing crontab -l (that's a lower case L) at the terminal prompt.

We recommend that you first try setting the job to run every 2 minutes (with */2), so that you can check, reasonably quickly, that it is running. 

Then edit crontab again and change the curl command to your preferred time.