problems with cron jobs

nickburrett

New member
Joined
Mar 4, 2006
Messages
3
I am trying to run a cron job in Direct Admin with errors every time, any idea what I'm doing wrong?

cd /usr/home/xxxdomain/domains/xxxdomain.net/public_html/e-support/email_gateway.php
cd: can't cd to /usr/home/xxxdomain/domains/xxxdomain.net/public_html/e-support/email_gateway.php

/home/xxxdomain/domains/xxxdomain.net/public_html/e-support/email_gateway.php
/home/xxxdomain/domains/xxxdomain.net/public_html/e-support/email_gateway.php: cannot open ?
: No such file or directory

/domains/xxxdomain.net/public_html/e-support/email_gateway.php
/domains/xxxdomain.net/public_html/e-support/email_gateway.php: not found
 
doesnt make sence at all
/domains/xxxdomain.net/public_html/e-support/email_gateway.php is not a directory, how can you cd into it?!

try

/usr/local/bin/php -q /path/to/yourfile.php dev/null 2>&1
 
Ok, thanks for that, I apologise in advance if this is a really stupid question, but that useage doesnt seem to do anything, but if I remove the file from the server I get an error report.

Is there any way I can see a log file to find out what the result of the cron job was?

/usr/local/bin/php -q /home/xxxusername/domains/xxxdomain.co.uk/public_html/support/email_gateway.php dev/null 2>&1
 
Viewing /var/log/cron will only work if you have root access to the server. If you drop the "dev/null 2>&1" from your command, you should receive an email report in your primary account every time the cronjob is run.
 
Back
Top