PDA

View Full Version : cronjob


Turbo_boy
10-10-2006, 03:11 PM
I searched google and this forum for it, but everything I found doesn't work.

I got the following cronjob:
5 * * * * /usr/local/bin/php /home/tust/domains/tust.nl/public_html/ircscript/index.php

I tryed also this one:
5 * * * * /usr/local/bin/php -c /home/tust/domains/tust.nl/public_html/ircscript/index.php

After the one with -c I received one mail from the cron daemon with a error in my php file (what isn't there when I execute it).

But if I put it again with -c it wouldn't execute nor send me a mail again.

What do I do frong?

The server owner doesn't get it too.

toml
10-10-2006, 05:42 PM
The -c should only be used to specify where the php.ini file is located.

Without some sort of failure being printed, I can only assume that index.php was executed and returned a 0 status and printed nothing. Try putting some debug code right after the <?php line in the script to insure that it is getting executed.

Turbo_boy
10-11-2006, 01:30 AM
I tryed with a echo but it get not executed.
The administrator did it 1 time directly from ssh and that one worked.

I don't receive any mail about it or any thing.

Turbo_boy
10-11-2006, 03:50 AM
now I get this error trought the mail:
PHP: Error parsing /home/tust/domains/tust.nl/public_html/ircscript/index.php on line 2

I only have this on the line: include('db.php');

nothing specially