Cron not executing


#1

Hi

I have a code for the cron job:

php /home/f4ceb00k/madhabs.com/viralscript/inc/php/sendinvitation.php

I have tried these variations:

wget -q0 /dev/null /home/f4ceb00k/madhabs.com/viralscript/inc/php/sendinvitation.php

and

/usr/bin/curl -s -o /dev/null /home/f4ceb00k/madhabs.com/viralscript/inc/php/sendinvitation.php

They do not seem to work.

Any advice?


#2

Using wget or curl, you need the URL of the code you want to run, not the path. If you run the script from the command line however, you will want to include the path to the PHP-CLI binary.

Examples are found here:

http://wiki.dreamhost.com/Crontab#Executing_a_PHP_Script_with_Crontabs


#3

Thanks for the response.

I looked at this wiki page:

http://wiki.dreamhost.com/Run_php_from_cron
[i forgot to mention that I was doing the cron job from the backend of the panel under goodies]

its states to do this:

/usr/local/bin/php /home//path/to/script.php

So would this be correct:

/usr/local/bin/php /home/f4ceb00k/madhabs.com/viralscript/inc/php/sendinvitation.php

thanks