tags:

views:

257

answers:

1

Hi, I'm trying to run a test script using crontab within Plesk. The php file simply emails me a message

mail('[email protected]','Cron Test','Test');

My path to php is /user/bin/php

I have entered * in every field, to run the script every minute with the following command:

/usr/bin/php -q /usr/httpdocs/crontest.php

However, the script is not being run.

Can anyone help?

I'm probably missing something simple, I've never used cron before.

Any advice appreciated.

Thanks.

+1  A: 

I would start by getting it to write to a log file. eg:

* * * * * /usr/bin/php -q /usr/httpdocs/crontest.php >> /a-location/crontest.log 2>&1

This will at least give you any obvious errors like not being able to find php etc.

tim harrison
Paul Lammertsma