title: Execute perl script continuously
body: <p>I'm new to Perl and i'm using Windows Machine</p>
  
  <p>Well i'm using PHP as well as Perl.. My complete web application was written in PHP. I have written a Perl Script for DB interaction for every 20 minutes.  My Perl script goes like this.</p>
  
  <pre><code>use strict;
  use warnings;
  
  sub Process1()
  {
      use DBI;
      use Date::Format;
  
      my $DBH=DBI-&gt;connect("DBI:mysql:dbname:localhost","root","");
      my $sth=$DBH-&gt;prepare("UPDATE tablename SET column1='blah'"); #update query
      $sth-&gt;execute();
      while (my @row=$sth-&gt;fetchrow_array)
      {
          print $row[0] . "\n";
      }
  }
  
  
  while(1) {
      &amp;Process1(); 
      sleep 900;
  }
  </code></pre>
  
  <p>If I have to run my perl script, I would just open Perl Commad line and execute the command</p>
  
  <pre><code>perl C:xampp\htdocs\samplescript.pl
  </code></pre>
  
  <p><strong>My questions are -</strong> </p>
  
  <ul>
  <li>How do I run the same Perl script in my Linux server.</li>
  <li>How to execute the command?</li>
  <li>If I close the perl command line in windows, the script will be stopped.<br> How to stop the same script in linux server?</li>
  </ul>