www.duckland.org/public/post/2008/11/alerting-with-remind/index.html
2022-06-05 09:26:14 -05:00

534 lines
15 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.

<!DOCTYPE html>
<html lang="en-us">
<head><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "BlogPosting",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https:\/\/www.duckland.org\/"
},
"articleSection" : "post",
"name" : "Alerting with Remind",
"headline" : "Alerting with Remind",
"description" : "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 have an event?\nIn its simplest form, when you run remind from the command line, it will not only display the current day\u0026rsquo;s reminders, but it will run in the background and wake up to tell you about other reminders on the screen while you work.",
"inLanguage" : "en",
"author" : "",
"creator" : "",
"publisher": "",
"accountablePerson" : "",
"copyrightHolder" : "",
"copyrightYear" : "2008",
"datePublished": "2008-11-19 17:11:00 -0700 -0700",
"dateModified" : "2008-11-19 17:11:00 -0700 -0700",
"url" : "https:\/\/www.duckland.org\/post\/2008\/11\/alerting-with-remind\/",
"wordCount" : "371",
"image" : "https://www.duckland.org/%!s(\u003cnil\u003e)"",
"keywords" : [ ""cli"","Blog" ]
}
</script>
<title>Alerting with Remind </title>
<meta name="description" content="Random Quacking" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="all,follow">
<meta name="googlebot" content="index,follow,snippet,archive">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link href="https://www.duckland.org/css/style.css?v=1654439072" rel="stylesheet" id="theme-stylesheet" type='text/css' media='all'>
<link href="https://www.duckland.org/css/custom.css?v=1654439072" rel="stylesheet" type='text/css' media='all'>
<link rel="shortcut icon" href="https://www.duckland.org/img/favicon.ico" type="image/x-icon">
<link rel="icon" href="https://www.duckland.org/img/favicon.ico" type="image/x-icon">
</head>
<body class="post-template-default single single-post single-format-standard ct-body singular singular-post not-front standard">
<div id="overflow-container" class="overflow-container">
<a class="skip-content" href="#main">Skip to content</a>
<header id="site-header" class="site-header" role="banner">
<div class='top-navigation'>
<div class='container'>
<div id="menu-secondary" class="menu-container menu-secondary" role="navigation">
<button id="toggle-secondary-navigation" class="toggle-secondary-navigation"><i class="fas fa-plus"></i></button>
<div class="menu">
<ul id="menu-secondary-items" class="menu-secondary-items">
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/personal">personal</a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/photos">photos</a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/sa">sa</a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/sitenews">sitenews</a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/software">software</a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/space">space</a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/travel">travel</a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/unix">unix</a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/work">work</a>
</li>
</ul>
</div>
</div>
<ul class="social-media-icons">
<li>
<a href="https://twitter.com/duckunix" data-animate-hover="pulse" class="twitter" target="_blank">
<i class="fab fa-twitter-square" title="twitter"></i>
<span class="screen-reader-text">twitter</span>
</a>
</li>
<li>
<a href="https://www.instagram.com/duckunix/" data-animate-hover="pulse" class="instagram" target="_blank">
<i class="fab fa-instagram" title="instagram"></i>
<span class="screen-reader-text">instagram</span>
</a>
</li>
<li>
<a href="mailto:duck@duckland.org" data-animate-hover="pulse" class="email">
<i class="fas fa-envelope" title="email"></i>
<span class="screen-reader-text">email</span>
</a>
</li>
<li>
<a href="https://www.linkedin.com/in/donaldharper/" data-animate-hover="pulse" class="linkedin" target="_blank">
<i class="fab fa-linkedin-in" title="linkedin"></i>
<span class="screen-reader-text">linkedin</span>
</a>
</li>
<li>
<a href="https://github.com/duckunix" data-animate-hover="pulse" class="github" target="_blank">
<i class="fab fa-github" title="github"></i>
<span class="screen-reader-text">github</span>
</a>
</li>
<li>
<a href="https://www.duckland.org/index.xml" data-animate-hover="pulse" class="rss" target="_blank">
<i class="fas fa-rss" title="rss"></i>
<span class="screen-reader-text">rss</span>
</a>
</li>
</ul></div>
</div>
<div class="container">
<div id="title-info" class="title-info">
<div id='site-title' class='site-title'>
<a href="/"> duckland.org </a>
</div>
</div>
<button id="toggle-navigation" class="toggle-navigation">
<i class="fas fa-bars"></i>
</button>
<div id="menu-primary-tracks" class="menu-primary-tracks"></div>
<div id="menu-primary" class="menu-container menu-primary" role="navigation">
<p class="site-description">Random Quacking</p>
<div class="menu">
<ul id="menu-primary-items" class="menu-primary-items">
<li class='menu-item menu-item-type-custom menu-item-object-custom '>
<a href="https://www.duckland.org/">Home</a>
</li>
<li class='menu-item menu-item-type-post_type menu-item-object-page '>
<a href="https://www.duckland.org/stories/about/">About</a>
</li>
<li class='menu-item menu-item-type-post_type menu-item-object-page '>
<a href="https://www.duckland.org/stories/privacy/">Privacy</a>
</li>
<li class='menu-item menu-item-type-post_type menu-item-object-page '>
<a href="https://www.duckland.org/photos/">Photo Galleries</a>
</li>
</ul>
</div>
</div>
</div>
</header>
<div id="main" class="main" role="main">
<div id="loop-container" class="loop-container">
<div class="post type-post status-publish format-standard hentry category-standard category-travel entry full-without-featured odd excerpt-1">
<div class="entry-meta">
<span class="date">19 November</span> <span> / </span>
<span class="author">
<a href="https://www.duckland.org/" title="Posts by Don Harper" rel="author">Don Harper</a>
</span>
<span class="category">
<span> / </span>
<a href="/categories/software">software</a>
</span>
</div>
<div class='entry-header'>
<h1 class='entry-title'> Alerting with Remind</h1>
</div>
<div class="entry-container">
<div class="entry-content">
<article>
<h1 id="alerting-with-remind">Alerting with Remind</h1>
<p>Back in my <a href="links://slug/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 <em>remind</em> from the command line, it
will not only display the current day&rsquo;s 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="links://slug/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 -k&rsquo;xmessage -buttons okay:0 -default okay %s&amp;&rsquo; ~/.reminders
&amp;</p>
</blockquote>
<p>Let&rsquo;s 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&quot;echo %s</p>
</blockquote>
</article>
</div>
<div class='entry-meta-bottom'>
<div class="entry-categories"><p><span>Categories</span>
<a href="/categories/software" title="View all posts in software">software</a>
</p>
</div>
<div class="entry-tags"><p><span>Tags</span>
<a href="/tags/cli" title="View all posts tagged cli">cli</a>
</p></div> </div>
<div class="author-meta">
<div class="author">
<img alt='Don Harper' src="https://www.gravatar.com/avatar/343531b2be7fcd30e48f5c07dcd2176f?s=100&d=identicon" class='avatar avatar-72 photo' height='72' width='72'>
<span>
Written by:<a href="https://www.duckland.org/" title="Posts by Don Harper" rel="author">Don Harper</a> </span>
</div>
<div class="bio">
<p>Don is a computer guy stumbling through life trying to raise his kids and take some pictures</p>
<a class="twitter" target="_blank"
href="https://twitter.com/duckunix">
<i class="fab fa-twitter-square"
title="twitter icon"></i>
</a>
<a class="linkedin" target="_blank"
href="https://www.linkedin.com/in/donaldharper/">
<i class="fab fa-linkedin"
title="linkedin icon"></i>
</a>
<a class="email" target="_blank"
href="mailto:duck@duckland.org">
<i class="fas fa-envelope"
title="email icon"></i>
</a>
<a class="instagram" target="_blank"
href="https://www.instagram.com/duckunix/">
<i class="fab fa-instagram"
title="instagram icon"></i>
</a>
<a class="github" target="_blank"
href="https://github.com/duckunix">
<i class="fab fa-github"
title="github icon"></i>
</a>
</div>
</div>
</div>
</div>
<section id="comments" class="comments">
</section>
</div>
</div>
<footer id="site-footer" class="site-footer" role="contentinfo">
<h1>
<a href=""> duckland.org </a>
</h1>
<p class="site-description">Random Quacking</p>
<div id="menu-footer" class="menu-container menu-footer" role="navigation">
<div class="menu">
<ul id="menu-footer-items" class="menu-footer-items">
</ul>
</div> </div>
<ul class="social-media-icons">
<li>
<a href="https://twitter.com/duckunix" class="twitter" target="_blank">
<i class="fab fa-twitter-square" title="twitter"></i>
<span class="screen-reader-text">twitter</span>
</a>
</li>
<li>
<a href="https://www.instagram.com/duckunix/" class="instagram" target="_blank">
<i class="fab fa-instagram" title="instagram"></i>
<span class="screen-reader-text">instagram</span>
</a>
</li>
<li>
<a href="mailto:duck@duckland.org" class="email">
<i class="fas fa-envelope" title="email"></i>
<span class="screen-reader-text">email</span>
</a>
</li>
<li>
<a href="https://www.linkedin.com/in/donaldharper/" class="linkedin" target="_blank">
<i class="fab fa-linkedin-in" title="linkedin"></i>
<span class="screen-reader-text">linkedin</span>
</a>
</li>
<li>
<a href="https://github.com/duckunix" class="github" target="_blank">
<i class="fab fa-github" title="github"></i>
<span class="screen-reader-text">github</span>
</a>
</li>
<li>
<a href="https://www.duckland.org/index.xml" data-animate-hover="pulse" class="rss" target="_blank">
<i class="fas fa-rss" title="rss"></i>
<span class="screen-reader-text">rss</span>
</a>
</li>
</ul> <div class="design-credit">
<p>© 2006-2021 Don Harper</p>
</div>
</footer>
</div>
<script src="https://www.duckland.org/js/jquery.min.js"></script>
<script src="https://www.duckland.org/js/jquerymigrate.js"></script>
<script src="https://www.duckland.org/js/production.min.js?v=1654439072"></script>
</body>
</html>