<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="http://tech.saigonist.com/taxonomy/term/124/all" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>crontab</title>
    <link>http://tech.saigonist.com/taxonomy/term/124/all</link>
    <description></description>
    <language>en</language>
          <item>
    <title>How to run a cronjob every X seconds in cron</title>
    <link>http://tech.saigonist.com/b/server/how-run-cronjob-every-x-seconds-cron</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;March 26, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/cron&quot;&gt;cron&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/crontab&quot;&gt;crontab&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Running a Unix command every few seconds is not something Vixie cron can deal with natively because its smallest level of granularity is the minute. It can easily run a script every minute. But to run a cron job every second, or every 5 seconds, or even every 30 seconds, takes a few more shell commands.&lt;/p&gt;

&lt;p&gt;As mentioned, a command can be run every minute with the crontab time signature of &lt;code&gt;* * * * *&lt;/code&gt; (5 stars) followed by the command.&lt;/p&gt;

&lt;p&gt;Had we wanted to run the command every 5 minutes, we can do that with &lt;code&gt;/5&lt;/code&gt; on the minute field: &lt;code&gt;*/5 * * * *&lt;/code&gt;....&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Sat, 26 Mar 2016 09:11:00 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">86 at http://tech.saigonist.com</guid>
  </item>
  <item>
    <title>Debugging and troubleshooting cron jobs</title>
    <link>http://tech.saigonist.com/b/server/debugging-and-troubleshooting-cron-jobs</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;March 17, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/cron&quot;&gt;cron&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/crontab&quot;&gt;crontab&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/unix&quot;&gt;unix&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Usually when I have mysterious problems with a new crontab, it&#039;s that I&#039;m not getting any results or output as expected, as if the command didn&#039;t run at all. Almost always, the newly added line to crontab was run. What did it do, what was the output, when did cron run? What should we check for?&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;p&gt;Rarely, there is a problem in the time/data fields. The fields are:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;minute&lt;/li&gt;
&lt;li&gt;hour&lt;/li&gt;
&lt;li&gt;day of month&lt;/li&gt;
&lt;li&gt;month&lt;/li&gt;
&lt;li&gt;day of week&lt;/li&gt;
&lt;li&gt;then the command&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;So make sure there are exactly 5 numbers or stars (&lt;em&gt;) before the command. Then&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;...&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Thu, 17 Mar 2016 07:48:00 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">77 at http://tech.saigonist.com</guid>
  </item>
  <item>
    <title>Solve mysterious Drupal initial page load delay with cron</title>
    <link>http://tech.saigonist.com/b/drupal/solve-mysterious-drupal-initial-page-load-delay-cron</link>
    <description>&lt;span class=&quot;submitted-by&quot;&gt;March 17, 2016&lt;/span&gt;&lt;div class=&quot;field_tags&quot;&gt;&lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/cron&quot;&gt;cron&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/crontab&quot;&gt;crontab&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;label label-info&quot;&gt;&lt;a href=&quot;/tags/unix&quot;&gt;unix&lt;/a&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;Sometimes you&#039;ll visit your Drupal site in the morning, or after logging in as admin for the first time in awhile, and the page will take forever to load, more than 30 seconds, even longer. (First, if you&#039;re using Cloudflare CDN, it could be a problem with their servers not sending the end of the page html when it&#039;s finished and thus causing the browser to hang for a long time.)&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;main cause&lt;/em&gt; of this kind of page load lag is Drupal&#039;s &lt;em&gt;cron task&lt;/em&gt;! There are two ways that Drupal will run cron. The first is when you trigger it externally (by pinging the cron.php url,...&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Thu, 17 Mar 2016 05:54:00 +0000</pubDate>
 <dc:creator>tomo</dc:creator>
 <guid isPermaLink="false">76 at http://tech.saigonist.com</guid>
  </item>
  </channel>
</rss>
