php - Cron running but functionality not working -


i have several php files run cron. set crons using command-

crontab crontab.txt 

inside crontab.txt file, have written cron commands this:-

#(updating tutor activities) - every minute * * * * * /usr/bin/wget -o - -q -t 1 http://project/cron/tutor_activities.php 

but none of functionalities working (database queries, sending reminder mails etc.). running urls manually works.

then put mail address in mailto , received mails. in mail, received entire html source of page. expected in mail? why functionalities not working?

updates
if change cron commands

 #(updating tutor activities) - every minute     * * * * * /usr/bin/wget http://project/cron/tutor_activities.php 

still no success , comes in mail -

--15:03:01--  http://project/cron/tutor_activities.php           => `tutor_activities.php' resolving project... ip address connecting test.project|ip address|:80... connected. http request sent, awaiting response... 301 moved permanently location: http://project./ [following] --15:03:01--  http://project./           => `index.html.1' resolving project.... ip address connecting project.|ip address|:80... connected. http request sent, awaiting response... 302 found location: http://project/home/ [following] --15:03:01--  http://project/home/           => `index.html.1' resolving project... ip address connecting wproject|ip address|:80... connected. http request sent, awaiting response... 200 ok length: unspecified [text/html] index.html.1 has sprung existence. retrying. 

and lots of index.html.1 , index.html.2 files accumulating in root of project. not want these files created. want files execute.

same results if use either of 2 commands -

   * * * * * /usr/bin/wget http://project/cron/tutor_activities.php     * * * * * wget http://project/cron/tutor_activities.php 

running php command mailto set sends me error /bin/sh: php: command not found.

* * * * * php /path/to/test.php 

so, not able use php command.

i have written simple mailto() inside test.php. mail not come when run through cron (using both wget , php fails) running url manually works.

my problem
make clear again, main problem functionality inside cron files not running. creation of files secondary issue.

any appreciated

thanks,
sandeepan

if want call url cronjob, you'll have use somthing wget. if it's php-script on server easier use php /...pathtomyscript.../cron/tutor_activities.php


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -