www.duckland.org/output/posts/200811alerting-with-remind.html
2015-06-09 22:50:31 -05:00

174 lines
8.5 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns# article: http://ogp.me/ns/article# " lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Alerting with Remind | duckland.org news</title>
<link href="../assets/css/all-nocdn.css" rel="stylesheet" type="text/css">
<link rel="alternate" type="application/rss+xml" title="RSS" href="../rss.xml">
<link rel="canonical" href="http://www.duckland.org/posts/200811alerting-with-remind.html">
<!--[if lt IE 9]><script src="../assets/js/html5.js"></script><![endif]--><meta name="author" content="Don Harper">
<link rel="prev" href="200808pizza-party-command-line-pizza-ordering-program.html" title="Pizza Party - Command Line Pizza ordering program" type="text/html">
<link rel="next" href="200812googles-calendar-on-the-command-line.html" title="Googles Calendar on the Command Line!" type="text/html">
<meta property="og:site_name" content="duckland.org news">
<meta property="og:title" content="Alerting with Remind">
<meta property="og:url" content="http://www.duckland.org/posts/200811alerting-with-remind.html">
<meta property="og:description" content="Alerting with Remind
Back in my article on Remind, I talked about the simple power of remind to power your scheduling needs.  That is all fine and good, but how to you get it to tell you when you hav">
<meta property="og:type" content="article">
<meta property="article:published_time" content="2008-11-19T17:11:00-06:00">
<meta property="article:tag" content="calendar">
<meta property="article:tag" content="cli">
<meta property="article:tag" content="remind">
<meta property="article:tag" content="software">
</head>
<body>
<a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>
<!-- Menubar -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"><div class="container">
<!-- This keeps the margins nice -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://www.duckland.org/">
<span id="blog-title">duckland.org news</span>
</a>
</div>
<!-- /.navbar-header -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">Home</a>
</li>
<li>
<a href="../stories/about.html">About me</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">My Sites<b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="http://www.donaldharper.com">My Photo Blog</a>
</li>
<li>
<a href="http://p365.donaldharper.com">My Attempt at a Project 365</a>
</li>
<li>
<a href="http://www.duckland.org">My Personal and Tech Blog</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Social Sites<b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="https://twitter.com/duckunix">My Twitter</a>
</li>
<li>
<a href="https://plus.google.com/+DonHarper/">My Google+</a>
</li>
<li>
<a href="http://www.linkedin.com/in/donaldharper/">My LinkedIN</a>
</li>
</ul>
</li>
<li>
<a href="../archive.html">Archive</a>
</li>
<li>
<a href="../categories/index.html">Tags</a>
</li>
<li>
<a href="../rss.xml">RSS</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right"></ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav><!-- End of Menubar --><div class="container" id="content">
<div class="body-content">
<!--Body content-->
<div class="row">
<article class="post-text h-entry hentry postpage" itemscope="itemscope" itemtype="http://schema.org/Article"><header><h1 class="p-name entry-title" itemprop="headline name"><a href="#" class="u-url">Alerting with Remind</a></h1>
<div class="metadata">
<p class="byline author vcard"><span class="byline-name fn">Don Harper</span></p>
<p class="dateline"><a href="#" rel="bookmark"><time class="published dt-published" datetime="2008-11-19T17:11:00-06:00" itemprop="datePublished" title="2008-11-19">2008-11-19</time></a></p>
</div>
</header><div class="e-content entry-content" itemprop="articleBody text">
<h1>Alerting with Remind</h1>
<p>Back in my <a href="http://www.duckland.org/archives/2008/08/05/so-you-need-a-calendar/">article on Remind</a>, I talked about the simple power of remind to power your scheduling needs.  That is all fine and good, but how to you get it to tell you when you have an event?</p>
<p>In its simplest form, when you run _remind _ from the command line, it will not only display the current days reminders, but it will run in the background and wake up to tell you about other reminders on the screen while you work.</p>
<p>This is fine, but what happens if you do not have that termial open in front of you?  Well, I have two ways I approach that issue.</p>
<p>First, when I run under X (<a href="http://www.duckland.org/archives/2006/12/31/what-do-i-use/">yeah, yeah, I know, but I use cli tools under X</a>), I have this added to my .xinitrc:</p>
<blockquote>
<p>remind -z -kxmessage -buttons okay:0 -default okay %s&amp; ~/.reminders &amp;</p>
</blockquote>
<p>Lets look at the command line:</p>
<ul>
<li>The <strong>-z</strong> tells remind to wake up every 5 minutes and reread the .reminders file.</li>
<li>The <strong>-k</strong> tells remind to run a command instead of simply printing the reminder to the screen</li>
<li>
<strong>xmessage -buttons okay:0 -default okay %s&amp;</strong> is the secret sauce of this.  This is the command run when there is an alarm.  This command line calls xmessage (which is on pretty much any box with X) to display the alert.  You could use zenity or kmessage, or winpopup, or whatever.  This is what puts the alert in your face when you are not looking at the screen.  The <strong>&amp;</strong> is needed to make this command non-blocking by putting it in the background.</li>
</ul>
<p>That all good if you are setting at your computer.  But, what do you do when <em>gasp</em> you leave to computer?  This is a little tricker.  For this, my solution needs two things: 1) a computer which is always on and 2) a way to send messages to your cell phone/pager (sms or email).  I have a cron job which checks to make sure remind is running, and restarts it if it is not (I use a hosting provider which does not like long running processes).  The command line is similar to the one for X, but with a difference:</p>
<blockquote>
<p>TZ=CDT6CST ~/bin/remind -z -k”echo %s</p>
</blockquote>
</div>
<aside class="postpromonav"><nav><ul itemprop="keywords" class="tags">
<li><a class="tag p-category" href="../categories/calendar.html" rel="tag">calendar</a></li>
<li><a class="tag p-category" href="../categories/cli.html" rel="tag">cli</a></li>
<li><a class="tag p-category" href="../categories/remind.html" rel="tag">remind</a></li>
<li><a class="tag p-category" href="../categories/software.html" rel="tag">software</a></li>
</ul>
<ul class="pager">
<li class="previous">
<a href="200808pizza-party-command-line-pizza-ordering-program.html" rel="prev" title="Pizza Party - Command Line Pizza ordering program">Previous post</a>
</li>
<li class="next">
<a href="200812googles-calendar-on-the-command-line.html" rel="next" title="Googles Calendar on the Command Line!">Next post</a>
</li>
</ul></nav></aside></article>
</div>
<!--End of body content-->
<footer>
Contents © 2015 <a href="mailto:duck@duckland.org">Don Harper</a> - Powered by <a href="http://getnikola.com" rel="nofollow">Nikola</a>
</footer>
</div>
</div>
<script src="../assets/js/all-nocdn.js"></script><script>jQuery("a.image-reference").colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script><!-- fancy dates --><script>
moment.locale("");
fancydates(1, "YYYY-MM-DD");
</script><!-- end fancy dates -->
</body>
</html>