can you help me setup cron job on godaddy webhosting? I have php file that i need to run, it is located in cron subdirectory (so address is http://test.com/cron/file.php). What
If you want to run a cron job in Godaddy. You can find following command, it will surely help you.
php -f /home/[user name]/[path to the file]
If you are using Godaddy this should solve your issue.
* * * * * /usr/local/bin/php /home/path/to/your/file.php > /dev/null
php_path -q file_name_with_absolute_path
/usr/bin/php -q /home/[user name]/public_html/test.php
1: How to know your php_path?
echo exec('whereis php');
2: How to know absolute path of your file?
echo dirname(__FILE__);
Use, for example CURL
or wget
or lynx
.
lynx -s http://link.to/script.php