Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h3>Preliminary</h3> <ul> <li><p>Check that in the crontab the values of <code>SHELL</code> and <code>PATH</code> are set up correctly, e.g.:</p> <pre><code>SHELL=/bin/bash PATH=/bin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/local/sbin:/usr/sbin </code></pre> <ul> <li>Ensure that the intended shell (e.g. bash) is really used.</li> <li>Ensure that all needed binaries are accessible via the denoted <code>PATH</code>. </li> </ul></li> <li>Check that you don't have an unescaped <code>%</code> in the crontab. See <code>man 5 crontab</code> for details.</li> <li><p>Maybe you set also the environment variable <code>MAILTO</code> to an approbate value, e.g.:</p> <pre><code>MAILTO="webmaster@example.com" </code></pre></li> </ul> <h3>Ensure your crontab is working</h3> <p>Another little trick to ensure that your <em>crontab</em> is parsed correct, is to add a <em>marker</em> entry at the <strong>end</strong>.</p> <p>I'm using myself this marker entry</p> <blockquote> <p>@daily logger -p local0.notice -t CRON '$Id: demo 7029 2012-11-27 09:27:39Z dirk $'</p> </blockquote> <p>If the marker entry is missing in the syslog, you know that the <em>crontab</em> has become corrupted. This may be triggered by some weird syntax error you haven't seen.</p> <h3>How to debug a cron job</h3> <p>If a cron job it not working please investigate first the job output.</p> <p>Change your crontab to:</p> <pre><code>0 1 * * * /bin/bash -x /var/www/example.com/processors/run.sh &gt;&gt;/tmp/cronTrace 2&gt;&amp;1 </code></pre> <p>Please investigate the generated script output together with the trace output (<code>bash -x</code>).</p> <h3>Additional note</h3> <p><strike><code>chmod +x $SCRIPT</code></strike><br/> <code>$PHP $SCRIPT</code></p> <p>The <code>chmod</code> step is not necessary and should be avoided. In the next line you invoke the script by explicitly use the interpreter command. </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.
    1. VO
      singulars
      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