This is just a quick (and probably pointless) script that I knocked up as an interface to NetSend on Windows NT.

In essence it's just a time trigger in which you store a message; the message being sent to the specified user at the appointed time.
This was really written as a simple introduction to perl that I could use to introduce some ideas and conventions to the "new guy" in the office.

Maybe one of you out there could take the idea and make it something a little more impressive :)

#!/usr/bin/perl # ==================================================================== +========================= # # reminder.pl # # Sends a reminder netsend to a specified user at a specified time. # my $version = "1.1"; # # Release # (1.0) - 29/5/2001 # + Version works # + Has some problems with the mins of the 24hour clock +- doesn't pad to 2 digits. # (1.1) - 30/5/2001 # + Fixed digit number problem. # + Still needs blank field checks # + Sleep time lengthened # # ==================================================================== +======================== use strict my $remindat; my $netto; my $msg; my $timenow; my ($min) = (localtime(time))[1]; $min = sprintf "%2.2d",$min; my ($hour) = (localtime(time))[2]; $hour = sprintf "%2.2d",$hour; $timenow= "$hour:$min"; print "\nTime now is $timenow\n\n"; print "Enter time to remind at ( hh:mm ) : "; $remindat = <STDIN>; chomp($remindat); $remindat =~ /(.*):(.*)/; my $remindmin = $2; $remindmin = sprintf "%2.2d",$remindmin; my $remindhour = $1; $remindhour = sprintf "%2.2d",$remindhour; $remindat = $remindhour.":".$remindmin; print "Netsend to : "; $netto = <STDIN>; chomp($netto); print "Message? : "; $msg = <STDIN>; chomp($msg); print "Will send the message to $netto at $remindat\n"; while (1) { ($min) = (localtime(time))[1]; ($hour) = (localtime(time))[2]; $timenow= "$hour:$min"; sleep(40); if ($timenow eq $remindat) { `net send $netto "$msg [ reminder.pl v$version ]"`; print "Sent\n"; exit(0); } } __END__

In reply to Set a time triggered reminder with NetSend by gothic_mallard

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.