Note that there are some explanatory texts on larger screens.

plurals
  1. POCron running but functionality not working
    primarykey
    data
    text
    <p>I have several PHP files to be run by cron. I set up the crons using command-</p> <pre><code>crontab crontab.txt </code></pre> <p>Inside the crontab.txt file, I have written cron commands like this:-</p> <pre><code>#(Updating tutor activities) - every minute * * * * * /usr/bin/wget -O - -q -t 1 http://project/cron/tutor_activities.php </code></pre> <p>But none of the functionalities are working (database queries, sending reminder mails etc.). Running the URLs manually works. </p> <p>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?</p> <p><strong>Updates</strong><br> If I change my cron commands to </p> <pre><code> #(Updating tutor activities) - every minute * * * * * /usr/bin/wget http://project/cron/tutor_activities.php </code></pre> <p>Still no success and this comes in my mail -</p> <pre><code>--15:03:01-- http://project/cron/tutor_activities.php =&gt; `tutor_activities.php' Resolving project... IP Address Connecting to test.project|IP Address|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://project./ [following] --15:03:01-- http://project./ =&gt; `index.html.1' Resolving project.... IP Address Connecting to project.|IP Address|:80... connected. HTTP request sent, awaiting response... 302 Found Location: http://project/home/ [following] --15:03:01-- http://project/home/ =&gt; `index.html.1' Resolving project... IP Address Connecting to wproject|IP Address|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] index.html.1 has sprung into existence. Retrying. </code></pre> <p>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.</p> <p>Same results if I use either of the two commands - </p> <pre><code> * * * * * /usr/bin/wget http://project/cron/tutor_activities.php * * * * * wget http://project/cron/tutor_activities.php </code></pre> <p>running <code>php</code> command with <code>MAILTO</code> set sends me this error /bin/sh: php: command not found. </p> <pre><code>* * * * * php /path/to/test.php </code></pre> <p>So, I am not able to use <code>php</code> command.</p> <p>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.</p> <p><strong>My problem</strong><br> 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.</p> <p>Any help would be appreciated </p> <p>Thanks,<br> Sandeepan</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload