Results 1 to 4 of 4
Thread: Cron does not working
May 19, 2006, 22:45 #1
Cron does not working
I set my php script at cron tab but it does not wrking properly.
I set the cron in 4 ways
2. wget http://www.xxx.com/test.php
3. php -f /path/test.php or php -q /path/test.php
4. lynx -dump http://www.xxx.com/test.php
After execution of each cron job i get this type of mail
1. /path/test.php: cannot open ?: No such file or directory
2. wget: not found
3. php: not found
4. lynx: not found
code of test.php is:
mail('firstname.lastname@example.org', 'testing cron', $time,
"Content-type: text/html; charset=iso-8859-1\r\n".
"X-Mailer: PHP/" . phpversion());
I set cron job for many time in different server. But in this case I unable to run cron job. I can't understand the actual reason.
May 20, 2006, 00:51 #2
- Join Date
- Jan 2005
- 0 Post(s)
- 0 Thread(s)
Basically, cron does work since you get an error message...
The problem is that the user under which the commands are executed does not find 'php', 'wget', ... in his path... The easiest solution is to provide the complete path...
Verify on your machine where wget, or whatever executable, is located and use the absolute path.. eg: instead of wget use /usr/bin/wget
May 20, 2006, 01:14 #3
Yes you are right
Cron is working . That's why i am getting error message. Byt mail is not delivered to the 'email@example.com'. My script is correct. and i set the root path at cron tab.
Can you tell me how can i know that where wget is installed at my server?
May 22, 2006, 05:54 #4
Is anybody here who can slove this problem!!