#!/usr/pkg/bin/perl -w # Displays my schedule for the next few days. # Written by Trevor Lalish-Menagh # http://www.trevreport.org/ # # You have to have a .reminders file in your $HOME dir # for this script to do anything useful. # # Check out 'man remind' and # http://www.43folders.com/2005/02/guest_mike_harr.html # for tips on using remind #my $day = qx!date '+%a 20%y-%m-%d'!; #my $week = "Today is $day\n"; $week .= "Today's reminders:\n"; $week .= qx!remind -q ~/.reminders `(echo 'banner %'; echo 'msg [trigger(today()+1)]') | remind -`!; # Clean up the formatting $week =~ s!(Today's\sreminders:)\nRemind.+\n!$1!g; # Add this week's calendar $week .= "\n"; $week .= qx!remind -q -c+ ~/.reminders!; # Add this month's calendar $week .= "\n"; $week .= qx!cal!; $week =~ s!\*!\ !g; # Send the email my $sendmail = "/usr/sbin/sendmail -t"; my $to = "To: USERNAME\n"; #my $subject = "Subject: Schedule for $day"; my $subject = "Subject: Schedule for today\n"; my $content = "$week"; open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!"; print SENDMAIL $to; print SENDMAIL $subject; print SENDMAIL "Content-type: text/plain\n\n"; print SENDMAIL $content; print SENDMAIL "\n.\n"; close(SENDMAIL);
1:15 3 * * 0 HOME_DIR/.scripts/emptytrashes
REM 1 Jan OMIT Sun AFTER MSG New Year's Day (Japanese Holiday).% REM Mon 8 Jan MSG Coming Of Age Day (Japanese Holiday).% REM 11 Feb OMIT Sun AFTER MSG Foundation Day (Japanese Holiday).% REM 21 Mar OMIT Sun AFTER MSG Spring Equinox, sometimes the 20th (Japanese Holiday).% REM 29 Apr OMIT Sun AFTER MSG Greenery Day (Japanese Holiday).% REM 3 May OMIT Sun AFTER MSG Constitution Day (Japanese Holiday).% REM 4 May OMIT Sun AFTER MSG National Day (Japanese Holiday).% REM 5 May OMIT Sun AFTER MSG Children's Day (Japanese Holiday).% REM Mon 15 Jul MSG Marine Day (Japanese Holiday).% REM Mon 15 Sep MSG Respect For The Aged Day (Japanese Holiday).% REM 23 Sep OMIT Sun AFTER MSG Autumn Equinox, sometimes the 24th (Japanese Holiday).% REM Mon 8 Oct MSG Sports Day (Japanese Holiday).% REM 3 Nov OMIT Sun AFTER MSG Culture Day (Japanese Holiday).% REM 23 Nov OMIT Sun AFTER MSG Labor Thanksgiving Day (Japanese Holiday).% REM 23 Dec OMIT Sun AFTER MSG Emperor's Birthday (Japanese Holiday).%
To learn more about remind and how you can use it plan your schedule check out the man page for remind(1) and Mike Harris looks at "Remind".