Well... there are not enough info...
Why you say doesnt work? If you run that command what should do? What log say?
Regards
*/1 * * * * cd /home/username/domains/domain.com/public_html/; /usr/local/bin/php /home/username/domains/domain.com/public_html/cron.php
*/1 * * * * /usr/bin/wget -q -O /dev/null http://domain.com/cron.php > /dev/null 2>&1
You should use search function of the forum, and you'll definitely find what you need:
Code:*/1 * * * * cd /home/username/domains/domain.com/public_html/; /usr/local/bin/php /home/username/domains/domain.com/public_html/cron.php
or
Code:*/1 * * * * /usr/bin/wget -q -O /dev/null http://domain.com/cron.php > /dev/null 2>&1
it doesnt work that way...it runs no matter what. Adjust your code then in the php file.
how to set timeout=0 or tries=1 in cron command?
*/5 * * * * cd /home/username/domains/domain.com/public_html/; /usr/local/bin/php /home/username/domains/domain.com/public_html/cron.php
does your php display an error if it cant find the file? adjust your code.
//PHP-File cron.php
ini_set('error_log','testlog.log');
$File = "test.txt";
$fh = fopen($File, 'w') or die("can't open file");
$stringData = "Test\n";
fwrite($fh, $stringData);
fclose($fh);
echo "HEEELLLLOOO WOOOORLD";