Cron running but functionality not working

Tubsisitiebra

New Member
I have several PHP files to be run by cron. I set up the crons using command-\[code\]crontab crontab.txt\[/code\]Inside the crontab.txt file, I have written cron commands like this:-\[code\]#(Updating tutor activities) - every minute* * * * * /usr/bin/wget -O - -q -t 1 http://project/cron/tutor_activities.php\[/code\]But none of the functionalities are working (database queries, sending reminder mails etc.). Running the URLs manually works. Then I put my mail address in \[code\]MAILTO\[/code\] and received the mails. In the mail, I received entire HTML source of the page. What is expected in the mail? Why are my functionalities not working?Updates
If I change my cron commands to \[code\] #(Updating tutor activities) - every minute * * * * * /usr/bin/wget http://project/cron/tutor_activities.php\[/code\]Still no success and this comes in my mail -\[code\]--15:03:01-- http://project/cron/tutor_activities.php => `tutor_activities.php'Resolving project... IP AddressConnecting to test.project|IP Address|:80... connected.HTTP request sent, awaiting response... 301 Moved PermanentlyLocation: http://project./ [following]--15:03:01-- http://project./ => `index.html.1'Resolving project.... IP AddressConnecting to project.|IP Address|:80... connected.HTTP request sent, awaiting response... 302 FoundLocation: http://project/home/ [following]--15:03:01-- http://project/home/ => `index.html.1'Resolving project... IP AddressConnecting to wproject|IP Address|:80... connected.HTTP request sent, awaiting response... 200 OKLength: unspecified [text/html]index.html.1 has sprung into existence.Retrying.\[/code\]And lots of \[code\]index.html.1\[/code\] , \[code\]index.html.2\[/code\] files are accumulating in the root of my project. I do not want these files to be created. Just want the files to execute.Same results if I use either of the two commands - \[code\] * * * * * /usr/bin/wget http://project/cron/tutor_activities.php * * * * * wget http://project/cron/tutor_activities.php\[/code\]running \[code\]php\[/code\] command with \[code\]MAILTO\[/code\] set sends me this error /bin/sh: php: command not found. \[code\]* * * * * php /path/to/test.php\[/code\]So, I am not able to use \[code\]php\[/code\] command.I have written a simple \[code\]mailto()\[/code\] inside my test.php. The mail does not come when run through cron (using both \[code\]wget\[/code\] and \[code\]php\[/code\] fails) but running the URL manually works.My problem
To make it clear again, my main problem is that the functionality inside the cron files is not running. Creation of files is a secondary issue.Any help would be appreciated Thanks,
Sandeepan
 
Back
Top