I have installed drupal and it works wonderfuly.... However now I am trying to setup a cron for cron.php and it is being a little difficult. I have talked with media temples support team and the have determined that I have to do something on my end... But I have no idea what.

I ran the cron from the root and I would get a permission error... I changed the permissions to 755 on cron.php and now i get an e-mail that says this.

/var/www/vhosts/johnpicozzi.com/httpdocs/cron.php: line 1: ?php: No such file or directory
/var/www/vhosts/johnpicozzi.com/httpdocs/cron.php: line 2: //: is a directory
/var/www/vhosts/johnpicozzi.com/httpdocs/cron.php: line 4: /aquota.group: Permission denied
/var/www/vhosts/johnpicozzi.com/httpdocs/cron.php: line 5: psa: command not found
/var/www/vhosts/johnpicozzi.com/httpdocs/cron.php: line 6: syntax error near unexpected token `('
/var/www/vhosts/johnpicozzi.com/httpdocs/cron.php: line 6: ` * Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).'

I am trying to setup a cron job using media temples plesk interface and I would like it to run from my user account instead of the root user account... Any one have any idea's.

Thanks,
Jp

Comments

domasj’s picture

You are trying to cron.php using shell interpreter whereas you should use php interpreter. Try using 'php /var/www/vhosts/johnpicozzi.com/httpdocs/cron.php' command or try adding the php interpreter line in the begining of cron.php file like they do at http://blog.digitalstruct.com/2007/04/24/tips-and-tricks-php-shell-scripts/.

jep2148’s picture

Ok... So it looks like it worked but i got this e-mail... is this normal?

PHP Notice: Undefined index: SCRIPT_NAME in /var/www/vhosts/johnpicozzi.com/httpdocs/includes/bootstrap.inc on line 203
PHP Notice: Undefined index: SCRIPT_FILENAME in /var/www/vhosts/johnpicozzi.com/httpdocs/includes/bootstrap.inc on line 203
PHP Notice: Undefined index: HTTP_HOST in /var/www/vhosts/johnpicozzi.com/httpdocs/includes/bootstrap.inc on line 204
PHP Notice: Undefined index: HTTP_HOST in /var/www/vhosts/johnpicozzi.com/httpdocs/includes/bootstrap.inc on line 261
PHP Notice: Undefined index: SCRIPT_NAME in /var/www/vhosts/johnpicozzi.com/httpdocs/includes/bootstrap.inc on line 265
PHP Notice: Undefined index: REMOTE_ADDR in /var/www/vhosts/johnpicozzi.com/httpdocs/includes/bootstrap.inc on line 850
PHP Notice: Undefined index: REMOTE_ADDR in /var/www/vhosts/johnpicozzi.com/httpdocs/includes/bootstrap.inc on line 791
PHP Notice: Undefined index: REQUEST_METHOD in /var/www/vhosts/johnpicozzi.com/httpdocs/includes/bootstrap.inc on line 466
X-Powered-By: PHP/4.3.9

Set-Cookie: SESSd41d8cd98f00b204e9800998ecf8427e=40687c1ce8fc57a9b2cd79bbec842075; expires=Fri, 25-Jan-2008 09:33:23 GMT; path=/

Expires: Sun, 19 Nov 1978 05:00:00 GMT

Last-Modified: Wed, 02 Jan 2008 06:00:03 GMT

Cache-Control: store, no-cache, must-revalidate

Cache-Control: post-check=0, pre-check=0

Content-Type: text/html; charset=utf-8

jep2148’s picture

Found out that the above is normal and everything looks to be working fine..... Thanks All