Perl Time clock

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Guern1
    New Member
    • Mar 2007
    • 14

    Perl Time clock

    Hi

    I need to switch on/off a post function in a Perl script between the hours of say ten to nine O Clock the following day this will stop the sending of SMS messages.

    What is the best way to go about this?

    Thanks

    Keith
  • miller
    Recognized Expert Top Contributor
    • Oct 2006
    • 1086

    #2
    Easy! Turn the script off from say ten pm till 9 am each night.

    QED :)
    - Miller

    Comment

    • KevinADC
      Recognized Expert Specialist
      • Jan 2007
      • 4092

      #3
      And if that doesn't work, maybe something like:

      Code:
      my $h = (localtime)[2];
      print $h;
      if ($h > 20 || $h < 10) {
         exit;
      }

      Comment

      Working...