Monthly Archives: November 2016

Cron on MacOS

I wanted to add a Cron job to my Mac – I just needed to poll a PHP script on a server once a day, so pretty simple.

The trick is using crontab with nano as the editor! In order to pull that off (I hate VI), I used the following command:

env EDITOR=nano crontab -e

Then it was just some pretty simple use of CURL to fetch from the URL of the PHP script:

25 20 * * * curl -s http://xxx.xxxxxxx.com/refreshTimeStamps.php > /dev/null

So, at 8:25pm every night, curl will pull from that URL, dump the output to null and not send me a mail – easy!