I would like to use cron on my Mac. I choose it over launchd
, because I want to be able to use my new knowledge on Linux as well. However, I cannot seem to get the crontab -e
command to work. It fires up vim, I enter my test job:
0-59 * * * * mollerhoj3 echo "Hello World"
But after saving and quitting (:wq
),
crontab -l
says:
No crontab for mollerhoj3
What am I doing wrong?
Just follow these steps:
crontab -e
.Type your cron job, for example:
30 * * * * /usr/bin/curl --silent --compressed http://example.com/crawlink.php
Press Esc to exit vim's insert mode.
crontab: installing new crontab
. You can verify the crontab file by using crontab -l
.Note however that this might not work depending on the content of your ~/.vimrc
file.