CRON - Revision history http://wiki.dd-wrt.com/wiki/index.php?title=CRON&action=history Revision history for this page on the wiki en MediaWiki 1.10.1 Fri, 29 Mar 2024 11:56:48 GMT Kernel-panic69: /* Restarting Crond */ (fix confusion about requirement to restart cron/crond) http://wiki.dd-wrt.com/wiki/index.php?title=CRON&diff=56226&oldid=prev <p><span class="autocomment">Restarting Crond -</span> (fix confusion about requirement to restart cron/crond)</p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 17:49, 18 April 2022</td> </tr> <tr><td colspan="2" align="left"><strong>Line 45:</strong></td> <td colspan="2" align="left"><strong>Line 45:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">=Restarting Crond=</td><td> </td><td style="background: #eee; font-size: smaller;">=Restarting Crond=</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;">After </del>you modify/add the appropriate command you will need to restart cron in order for your changes to take effect. You can restart crond with the following <del style="color: red; font-weight: bold; text-decoration: none;">command</del>: </td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">'''NOTE:''' v24sp1 deletes the /tmp/cron.d directory when the cron service is stopped. Should you stop the service, make the /tmp/cron.d directory, put your cron script in that directory, then restart the cron service.&lt;br&gt;</ins></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Older versions of DD-WRT:</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">'''NOTE: For builds 41174 and older,''' after </ins>you modify/add the appropriate command you will need to restart cron in order for your changes to take effect. <ins style="color: red; font-weight: bold; text-decoration: none;">'''For builds 41212 and newer, a restart is not required.'''&lt;br&gt;</ins></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;">* </del>stopservice cron &amp;&amp; startservice cron</td><td>+</td><td style="background: #cfc; font-size: smaller;">You can restart crond with the following <ins style="color: red; font-weight: bold; text-decoration: none;">commands</ins>:<ins style="color: red; font-weight: bold; text-decoration: none;">&lt;br&gt;</ins></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Newer versions of DD-WRT:</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;">* </del>stopservice crond &amp;&amp; startservice crond</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">*</ins>Older versions of DD-WRT:</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">&#160;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">&lt;pre&gt;</ins>stopservice cron &amp;&amp; startservice cron<ins style="color: red; font-weight: bold; text-decoration: none;">&lt;/pre&gt;</ins></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;">Note: v24sp1 deletes the </del>/<del style="color: red; font-weight: bold; text-decoration: none;">tmp/cron.d directory when the cron service is stopped. You should stop the service, make the /tmp/cron.d directory, put your cron script in that directory, then restart the cron service.</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">*</ins>Newer versions of DD-WRT:</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">&lt;pre&gt;</ins>stopservice crond &amp;&amp; startservice crond<ins style="color: red; font-weight: bold; text-decoration: none;">&lt;</ins>/<ins style="color: red; font-weight: bold; text-decoration: none;">pre&gt;</ins></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">==Additional Information==</td><td> </td><td style="background: #eee; font-size: smaller;">==Additional Information==</td></tr> </table> Mon, 18 Apr 2022 17:49:21 GMT Kernel-panic69 http://wiki.dd-wrt.com/wiki/index.php/Talk:CRON Kernel-panic69: /* External Links */ (cleanup external links to remove broken / unnecessary links) http://wiki.dd-wrt.com/wiki/index.php?title=CRON&diff=56135&oldid=prev <p><span class="autocomment">External Links -</span> (cleanup external links to remove broken / unnecessary links)</p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 22:50, 2 December 2021</td> </tr> <tr><td colspan="2" align="left"><strong>Line 102:</strong></td> <td colspan="2" align="left"><strong>Line 102:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">=External Links=</td><td> </td><td style="background: #eee; font-size: smaller;">=External Links=</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">* [https://<del style="color: red; font-weight: bold; text-decoration: none;">www</del>.<del style="color: red; font-weight: bold; text-decoration: none;">dd-wrt.com</del>/<del style="color: red; font-weight: bold; text-decoration: none;">wiki</del>/<del style="color: red; font-weight: bold; text-decoration: none;">index.php?title=Special:Search&amp;search=Cron&amp;fulltext=Search Articles containing 'CRON' on the DD</del>-<del style="color: red; font-weight: bold; text-decoration: none;">WRT Wiki]</del></td><td>+</td><td style="background: #cfc; font-size: smaller;">* [https://<ins style="color: red; font-weight: bold; text-decoration: none;">man7</ins>.<ins style="color: red; font-weight: bold; text-decoration: none;">org</ins>/<ins style="color: red; font-weight: bold; text-decoration: none;">linux</ins>/<ins style="color: red; font-weight: bold; text-decoration: none;">man</ins>-<ins style="color: red; font-weight: bold; text-decoration: none;">pages</ins>/<ins style="color: red; font-weight: bold; text-decoration: none;">man8</ins>/<ins style="color: red; font-weight: bold; text-decoration: none;">cron</ins>.<ins style="color: red; font-weight: bold; text-decoration: none;">8</ins>.<ins style="color: red; font-weight: bold; text-decoration: none;">html cron(8) — Linux manual page</ins>]</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;">* [http:</del>//<del style="color: red; font-weight: bold; text-decoration: none;">unixhelp</del>.<del style="color: red; font-weight: bold; text-decoration: none;">ed</del>.<del style="color: red; font-weight: bold; text-decoration: none;">ac.uk/CGI/man-cgi?crontab+5 Unix Man Pages: Cron</del>]</td><td>+</td><td style="background: #cfc; font-size: smaller;">* [<ins style="color: red; font-weight: bold; text-decoration: none;">https</ins>://<ins style="color: red; font-weight: bold; text-decoration: none;">man7</ins>.<ins style="color: red; font-weight: bold; text-decoration: none;">org/</ins>linux/<ins style="color: red; font-weight: bold; text-decoration: none;">man-pages</ins>/<ins style="color: red; font-weight: bold; text-decoration: none;">man5</ins>/<ins style="color: red; font-weight: bold; text-decoration: none;">crontab</ins>.<ins style="color: red; font-weight: bold; text-decoration: none;">5</ins>.<ins style="color: red; font-weight: bold; text-decoration: none;">html </ins>crontab<ins style="color: red; font-weight: bold; text-decoration: none;">(5) — Linux manual page</ins>]</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">* [<del style="color: red; font-weight: bold; text-decoration: none;">http</del>://<del style="color: red; font-weight: bold; text-decoration: none;">www</del>.<del style="color: red; font-weight: bold; text-decoration: none;">math-</del>linux<del style="color: red; font-weight: bold; text-decoration: none;">.com</del>/<del style="color: red; font-weight: bold; text-decoration: none;">spip.php?article45 Crontab : Scheduling Tasks]</del></td><td>+</td><td style="background: #cfc; font-size: smaller;">* [<ins style="color: red; font-weight: bold; text-decoration: none;">https</ins>://<ins style="color: red; font-weight: bold; text-decoration: none;">math</ins>-<ins style="color: red; font-weight: bold; text-decoration: none;">linux</ins>.com/<ins style="color: red; font-weight: bold; text-decoration: none;">linux</ins>/<ins style="color: red; font-weight: bold; text-decoration: none;">tip</ins>-<ins style="color: red; font-weight: bold; text-decoration: none;">of</ins>-<ins style="color: red; font-weight: bold; text-decoration: none;">the</ins>-<ins style="color: red; font-weight: bold; text-decoration: none;">day</ins>/<ins style="color: red; font-weight: bold; text-decoration: none;">article</ins>/<ins style="color: red; font-weight: bold; text-decoration: none;">crontab</ins>-<ins style="color: red; font-weight: bold; text-decoration: none;">scheduling</ins>-<ins style="color: red; font-weight: bold; text-decoration: none;">tasks </ins>Crontab <ins style="color: red; font-weight: bold; text-decoration: none;">: Scheduling Tasks</ins>]</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;">* [http:</del>//<del style="color: red; font-weight: bold; text-decoration: none;">wiki</del>.<del style="color: red; font-weight: bold; text-decoration: none;">dreamhost</del>.<del style="color: red; font-weight: bold; text-decoration: none;">com/index.php/Crontab Dreamhost </del>crontab <del style="color: red; font-weight: bold; text-decoration: none;">wiki</del>]</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">* [<del style="color: red; font-weight: bold; text-decoration: none;">http</del>://<del style="color: red; font-weight: bold; text-decoration: none;">blog.eukhost.com/2006/06/07/cron</del>-<del style="color: red; font-weight: bold; text-decoration: none;">job-in-cpanel Cron Job in cPanel]</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;">* [http://blog.webhosting.uk</del>.com/<del style="color: red; font-weight: bold; text-decoration: none;">2006</del>/<del style="color: red; font-weight: bold; text-decoration: none;">06/07/cron</del>-<del style="color: red; font-weight: bold; text-decoration: none;">jobs</del>-<del style="color: red; font-weight: bold; text-decoration: none;">automated</del>-<del style="color: red; font-weight: bold; text-decoration: none;">processes</del>/ <del style="color: red; font-weight: bold; text-decoration: none;">Cron Jobs (Automated Processes)]</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;">* [http:</del>/<del style="color: red; font-weight: bold; text-decoration: none;">/www.bodhost.com/web</del>-<del style="color: red; font-weight: bold; text-decoration: none;">hosting/cron</del>-<del style="color: red; font-weight: bold; text-decoration: none;">explanation/ </del>Crontab <del style="color: red; font-weight: bold; text-decoration: none;">Explained</del>]</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">* [http://en.wikipedia.org/wiki/Crontab Wikipedia Crontab]</td><td> </td><td style="background: #eee; font-size: smaller;">* [http://en.wikipedia.org/wiki/Crontab Wikipedia Crontab]</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Middleware settings]][[Category:Advanced tutorials]]</td><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Middleware settings]][[Category:Advanced tutorials]]</td></tr> </table> Thu, 02 Dec 2021 22:50:11 GMT Kernel-panic69 http://wiki.dd-wrt.com/wiki/index.php/Talk:CRON Ian5142: Fixed in r41189, https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321629 http://wiki.dd-wrt.com/wiki/index.php?title=CRON&diff=54976&oldid=prev <p>Fixed in r41189, https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321629</p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 18:00, 16 October 2019</td> </tr> <tr><td colspan="2" align="left"><strong>Line 89:</strong></td> <td colspan="2" align="left"><strong>Line 89:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">This requires a stopservice cron; startservice cron or a reboot.</td><td> </td><td style="background: #eee; font-size: smaller;">This requires a stopservice cron; startservice cron or a reboot.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">V23 does not have this problem.</td><td> </td><td style="background: #eee; font-size: smaller;">V23 does not have this problem.</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">fixed in build r41189, as per this thread: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321629</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">==Working Directory==</td><td> </td><td style="background: #eee; font-size: smaller;">==Working Directory==</td></tr> </table> Wed, 16 Oct 2019 18:00:49 GMT Ian5142 http://wiki.dd-wrt.com/wiki/index.php/Talk:CRON Ian5142: Added to Scripting category http://wiki.dd-wrt.com/wiki/index.php?title=CRON&diff=54464&oldid=prev <p>Added to Scripting category</p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 20:57, 11 October 2018</td> </tr> <tr><td colspan="2" align="left"><strong>Line 109:</strong></td> <td colspan="2" align="left"><strong>Line 109:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">* [http://en.wikipedia.org/wiki/Crontab Wikipedia Crontab]</td><td> </td><td style="background: #eee; font-size: smaller;">* [http://en.wikipedia.org/wiki/Crontab Wikipedia Crontab]</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">[[Category:Middleware settings]]</td><td>+</td><td style="background: #cfc; font-size: smaller;">[[Category:Middleware settings<ins style="color: red; font-weight: bold; text-decoration: none;">]][[Category:Advanced tutorials</ins>]]</td></tr> </table> Thu, 11 Oct 2018 20:57:21 GMT Ian5142 http://wiki.dd-wrt.com/wiki/index.php/Talk:CRON Paulbeard: /* Cron Job Instruction: Locations */ http://wiki.dd-wrt.com/wiki/index.php?title=CRON&diff=41850&oldid=prev <p><span class="autocomment">Cron Job Instruction: Locations</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 18:31, 20 January 2012</td> </tr> <tr><td colspan="2" align="left"><strong>Line 22:</strong></td> <td colspan="2" align="left"><strong>Line 22:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">=Cron Job Instruction: Locations=</td><td> </td><td style="background: #eee; font-size: smaller;">=Cron Job Instruction: Locations=</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Cron job instructions can be stored in at least three locations on DD-WRT:</td><td> </td><td style="background: #eee; font-size: smaller;">Cron job instructions can be stored in at least three locations on DD-WRT:</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">&#160;</td><td>+</td><td style="background: #cfc; font-size: smaller;"># Put your crontab-formatted instructions in the Web Interface cron box <ins style="color: red; font-weight: bold; text-decoration: none;">on the Administration-&gt;Management screen</ins>. This is the easiest method<ins style="color: red; font-weight: bold; text-decoration: none;">. Using stopservice cron &amp;&amp; startservice cron in the console will store those commands in /tmp/cron.d/cron_jobs. Files stored in /tmp are cleared out at reboot time so it would be wise to preserve a copy of any needed commands, ideally using a mounted filesystem or an SD card if your router is equipped with one</ins>. </td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"># Put your crontab-formatted instructions in the Web Interface cron box. This is the easiest method <del style="color: red; font-weight: bold; text-decoration: none;">and recommended by this article author</del>.</td><td>+</td><td style="background: #cfc; font-size: smaller;"># Crontab files can be created and saved in /tmp/cron.d, which is <ins style="color: red; font-weight: bold; text-decoration: none;">stored </ins>in RAM and lost when restarting the DD-WRT device or loss of power<ins style="color: red; font-weight: bold; text-decoration: none;">. Commands added to the cron_jobs file are displayed on the Administration-&gt;Management page. As noted above, using stopservice cron &amp;&amp; startservice cron will store those commands in /tmp/cron.d/cron_jobs</ins>. </td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"># Crontab files can be created and saved in /tmp/cron.d, which is in RAM and lost when restarting the DD-WRT device<del style="color: red; font-weight: bold; text-decoration: none;">, </del>or loss of power.</td><td>+</td><td style="background: #cfc; font-size: smaller;"># Crontab files can be stored in /jffs/etc/crontab<ins style="color: red; font-weight: bold; text-decoration: none;">, if you use the JFFS filesystem</ins>. See [[JFFS]].</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"># Crontab files can be stored in /jffs/etc/crontab. See [[JFFS]].</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"># When using backslash or single quote in the crontab file via GUI, be aware that V24 has a bug (#3872) 27-Mar-2010</del></td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">&#160;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">'''It is important that you include &quot;root&quot; before the command''', otherwise the command will not run as specified. The examples, in external links above or elsewhere, leave off prefixing commands with &quot;root&quot;. External examples outside this Wiki and DD-WRT, are designed for common multi-account Linux systems: cron normally runs instructions inside crontab files as dependent on whichever user created them.</td><td> </td><td style="background: #eee; font-size: smaller;">'''It is important that you include &quot;root&quot; before the command''', otherwise the command will not run as specified. The examples, in external links above or elsewhere, leave off prefixing commands with &quot;root&quot;. External examples outside this Wiki and DD-WRT, are designed for common multi-account Linux systems: cron normally runs instructions inside crontab files as dependent on whichever user created them.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Without using &quot;root&quot;, your test only works in telnet or ssh (eg Putty) because you already logged in as root.</td><td> </td><td style="background: #eee; font-size: smaller;">Without using &quot;root&quot;, your test only works in telnet or ssh (eg Putty) because you already logged in as root.</td></tr> </table> Fri, 20 Jan 2012 18:31:57 GMT Paulbeard http://wiki.dd-wrt.com/wiki/index.php/Talk:CRON Point: /* $PATH Differences */ http://wiki.dd-wrt.com/wiki/index.php?title=CRON&diff=41265&oldid=prev <p><span class="autocomment">$PATH Differences</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 21:28, 25 September 2011</td> </tr> <tr><td colspan="2" align="left"><strong>Line 87:</strong></td> <td colspan="2" align="left"><strong>Line 87:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> root@DD-WRT:~# echo PATH=$PATH</td><td> </td><td style="background: #eee; font-size: smaller;"> root@DD-WRT:~# echo PATH=$PATH</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> '''PATH=/bin:/usr/bin:/sbin:/usr/sbin:/jffs/sbin:/jffs/bin:/jffs/usr/sbin:/jffs/usr/bin:/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin'''</td><td> </td><td style="background: #eee; font-size: smaller;"> '''PATH=/bin:/usr/bin:/sbin:/usr/sbin:/jffs/sbin:/jffs/bin:/jffs/usr/sbin:/jffs/usr/bin:/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin'''</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">==CRON Service falling asleep in V24==</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">The cron service is frequently falling asleep and cron jobs are not executed. </td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">This requires a stopservice cron; startservice cron or a reboot.</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">V23 does not have this problem.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">==Working Directory==</td><td> </td><td style="background: #eee; font-size: smaller;">==Working Directory==</td></tr> </table> Sun, 25 Sep 2011 21:28:04 GMT Point http://wiki.dd-wrt.com/wiki/index.php/Talk:CRON Phuzi0n: /* $PATH Differences */ - add info about using the which command to find the full path http://wiki.dd-wrt.com/wiki/index.php?title=CRON&diff=38111&oldid=prev <p><span class="autocomment">$PATH Differences -</span> - add info about using the which command to find the full path</p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 08:09, 20 January 2011</td> </tr> <tr><td colspan="2" align="left"><strong>Line 80:</strong></td> <td colspan="2" align="left"><strong>Line 80:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">=Common Problems=</td><td> </td><td style="background: #eee; font-size: smaller;">=Common Problems=</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">==$PATH Differences==</td><td> </td><td style="background: #eee; font-size: smaller;">==$PATH Differences==</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Cron runs with a different $PATH variable than you have in your shell when you [[Telnet/SSH]] to the router. The $PATH variable contains locations for the shell to look for applications when you try to run a them without a full path to the application. This means that Cron may not find programs you're trying to use. You can either <del style="color: red; font-weight: bold; text-decoration: none;">use </del>the full path to apps within your scripts, such as '''/usr/bin/uptime''' instead of just '''uptime''', or you can check what your $PATH is by running '''echo PATH=$PATH''' in your shell and then copying the output to the top of your crontab or script.</td><td>+</td><td style="background: #cfc; font-size: smaller;">Cron runs with a different $PATH variable than you have in your shell when you [[Telnet/SSH]] to the router. The $PATH variable contains locations for the shell to look for applications when you try to run a them without a full path to the application. This means that Cron may not find programs you're trying to use. You can either <ins style="color: red; font-weight: bold; text-decoration: none;">check what </ins>the full path to apps <ins style="color: red; font-weight: bold; text-decoration: none;">is using the '''which''' command and then use the full path </ins>within your scripts, such as '''/usr/bin/uptime''' instead of just '''uptime''', or you can check what your $PATH is by running '''echo PATH=$PATH''' in your shell and then copying the output to the top of your crontab or script.</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> root@DD-WRT:~# which uptime</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> '''/usr/bin/uptime'''</ins></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> root@DD-WRT:~# echo PATH=$PATH</td><td> </td><td style="background: #eee; font-size: smaller;"> root@DD-WRT:~# echo PATH=$PATH</td></tr> </table> Thu, 20 Jan 2011 08:09:43 GMT Phuzi0n http://wiki.dd-wrt.com/wiki/index.php/Talk:CRON Phuzi0n: a couple common problems explained http://wiki.dd-wrt.com/wiki/index.php?title=CRON&diff=37475&oldid=prev <p>a couple common problems explained</p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 12:37, 11 December 2010</td> </tr> <tr><td colspan="2" align="left"><strong>Line 1:</strong></td> <td colspan="2" align="left"><strong>Line 1:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">{{Languages|CRON}}</td><td> </td><td style="background: #eee; font-size: smaller;">{{Languages|CRON}}</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">=Introduction=</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">'''Cron''', also referred to as '''crond''', is a service which can be turned on in DD-WRT systems. Cron is the standard system scheduler process within a system running Linux and other *nix variants. Older versions of DD-WRT Linux use the name and command cron; in newer builds the name cron has been changed to crond, however they work the same.</td><td> </td><td style="background: #eee; font-size: smaller;">'''Cron''', also referred to as '''crond''', is a service which can be turned on in DD-WRT systems. Cron is the standard system scheduler process within a system running Linux and other *nix variants. Older versions of DD-WRT Linux use the name and command cron; in newer builds the name cron has been changed to crond, however they work the same.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td colspan="2" align="left"><strong>Line 75:</strong></td> <td colspan="2" align="left"><strong>Line 77:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> # | | | | day of the week (0-6 with 0=Sunday).</td><td> </td><td style="background: #eee; font-size: smaller;"> # | | | | day of the week (0-6 with 0=Sunday).</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> # | | | | | commands</td><td> </td><td style="background: #eee; font-size: smaller;"> # | | | | | commands</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">=Common Problems=</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">==$PATH Differences==</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Cron runs with a different $PATH variable than you have in your shell when you [[Telnet/SSH]] to the router. The $PATH variable contains locations for the shell to look for applications when you try to run a them without a full path to the application. This means that Cron may not find programs you're trying to use. You can either use the full path to apps within your scripts, such as '''/usr/bin/uptime''' instead of just '''uptime''', or you can check what your $PATH is by running '''echo PATH=$PATH''' in your shell and then copying the output to the top of your crontab or script.</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> root@DD-WRT:~# echo PATH=$PATH</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> '''PATH=/bin:/usr/bin:/sbin:/usr/sbin:/jffs/sbin:/jffs/bin:/jffs/usr/sbin:/jffs/usr/bin:/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin'''</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">==Working Directory==</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">Cron runs with the same working directory that you have when you [[Telnet/SSH]] to the router which is:</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> root@DD-WRT:~# pwd</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> '''/tmp/root'''</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">If you're saving files without a path then they'll end up in this directory. Be sure your paths to files are correct so that you're not looking for them in the wrong places.</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">=External Links=</td><td> </td><td style="background: #eee; font-size: smaller;">=External Links=</td></tr> </table> Sat, 11 Dec 2010 12:37:57 GMT Phuzi0n http://wiki.dd-wrt.com/wiki/index.php/Talk:CRON Christop: spelling fixes http://wiki.dd-wrt.com/wiki/index.php?title=CRON&diff=35316&oldid=prev <p>spelling fixes</p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 08:27, 18 August 2010</td> </tr> <tr><td colspan="2" align="left"><strong>Line 1:</strong></td> <td colspan="2" align="left"><strong>Line 1:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">{{Languages|CRON}}</td><td> </td><td style="background: #eee; font-size: smaller;">{{Languages|CRON}}</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">'''Cron''', also referred to as '''crond''', is a service which can be turned on in DD-WRT systems. Cron is the standard system scheduler process within a system running Linux and other *nix <del style="color: red; font-weight: bold; text-decoration: none;">varients</del>. Older versions of DD-WRT Linux use the name and command cron; in newer builds the name cron has been changed to crond, however they work the same.</td><td>+</td><td style="background: #cfc; font-size: smaller;">'''Cron''', also referred to as '''crond''', is a service which can be turned on in DD-WRT systems. Cron is the standard system scheduler process within a system running Linux and other *nix <ins style="color: red; font-weight: bold; text-decoration: none;">variants</ins>. Older versions of DD-WRT Linux use the name and command cron; in newer builds the name cron has been changed to crond, however they work the same.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Cron can be enabled in the Services/Services (v23) or Administration/Management (v24) section of the Web Interface of DD-WRT.</td><td> </td><td style="background: #eee; font-size: smaller;">Cron can be enabled in the Services/Services (v23) or Administration/Management (v24) section of the Web Interface of DD-WRT.</td></tr> <tr><td colspan="2" align="left"><strong>Line 63:</strong></td> <td colspan="2" align="left"><strong>Line 63:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> /bin/sh -c 'echo &quot;# | | | | | commands&quot; &gt;&gt; /tmp/crontab'</td><td> </td><td style="background: #eee; font-size: smaller;"> /bin/sh -c 'echo &quot;# | | | | | commands&quot; &gt;&gt; /tmp/crontab'</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">Please note: Things that execute in the startup script are invoked without a shell, so stdout and stderr pipes will not be <del style="color: red; font-weight: bold; text-decoration: none;">interperted </del>properly if you don't invoke the shell manually (/bin/sh -c).</td><td>+</td><td style="background: #cfc; font-size: smaller;">Please note: Things that execute in the startup script are invoked without a shell, so stdout and stderr pipes will not be <ins style="color: red; font-weight: bold; text-decoration: none;">interpreted </ins>properly if you don't invoke the shell manually (/bin/sh -c).</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Note: If your device is using v23sp1, the startup script is broken, so you will want to save all this as the &quot;firewall&quot; script.</td><td> </td><td style="background: #eee; font-size: smaller;">Note: If your device is using v23sp1, the startup script is broken, so you will want to save all this as the &quot;firewall&quot; script.</td></tr> </table> Wed, 18 Aug 2010 08:27:41 GMT Christop http://wiki.dd-wrt.com/wiki/index.php/Talk:CRON Leangjia at 15:14, 4 August 2010 http://wiki.dd-wrt.com/wiki/index.php?title=CRON&diff=35055&oldid=prev <p></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 15:14, 4 August 2010</td> </tr> <tr><td colspan="2" align="left"><strong>Line 1:</strong></td> <td colspan="2" align="left"><strong>Line 1:</strong></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">{{Languages|<del style="color: red; font-weight: bold; text-decoration: none;">Contribute</del>}}</td><td>+</td><td style="background: #cfc; font-size: smaller;">{{Languages|<ins style="color: red; font-weight: bold; text-decoration: none;">CRON</ins>}}</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">'''Cron''', also referred to as '''crond''', is a service which can be turned on in DD-WRT systems. Cron is the standard system scheduler process within a system running Linux and other *nix varients. Older versions of DD-WRT Linux use the name and command cron; in newer builds the name cron has been changed to crond, however they work the same.</td><td> </td><td style="background: #eee; font-size: smaller;">'''Cron''', also referred to as '''crond''', is a service which can be turned on in DD-WRT systems. Cron is the standard system scheduler process within a system running Linux and other *nix varients. Older versions of DD-WRT Linux use the name and command cron; in newer builds the name cron has been changed to crond, however they work the same.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> </table> Wed, 04 Aug 2010 15:14:44 GMT Leangjia http://wiki.dd-wrt.com/wiki/index.php/Talk:CRON