I'm trying to execute a PHP script every two minutes on my server, but it doesn't seem to be working.

I'm using the following cron job:

2 * * * * /usr/bin/php /srv/www/<snip>/<snip>/run.php

I also tried:

2 * * * * php /srv/www/<snip>/<snip>/run.php

Both of which execute properly via the SSH command line.

I entered the cron job in with the following method via SSH:

crontab -e

I'm also running Ubuntu 10.04.3 LTS if that matters.

Is there something I'm doing wrong? any advice?

1 Answer 1


You wrote 2 in the minute column, so the job runs at 2 minutes past the hour, every hour. To run the job every 2 minutes, write

*/2 * * * * php /srv/www/<snip>/<snip>/run.php

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .