Skip to content

Instantly share code, notes, and snippets.

@porjo
Last active August 29, 2015 14:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save porjo/258abbc727bd8f766cb0 to your computer and use it in GitHub Desktop.
Save porjo/258abbc727bd8f766cb0 to your computer and use it in GitHub Desktop.
Linux 'remind' utility
# Example reminders file
FSET _yr_num(yr) ORD(YEAR(TRIGDATE()) - yr)
# Trigger warning every 14, 7, 1, 0 days
FSET _warnfunc(x) choose(x, 14, 7, 1, 0)
# -------------------
# Birthday's
# -------------------
REM 3 Jan WARN _warnfunc MSG %"John's [_yr_num(1970)] Birthday%" is %k (%xd)
REM 19 Jan WARN _warnfunc MSG %"Mary's [_yr_num(1978)] Birthday%" is %k (%xd)
# -------------------
# Anniversaries
# -------------------
REM 21 Apr WARN _warnfunc MSG %"Sue and Rod's [_yr_num(2007)] Wedding Anniversary%" is %k (%xd)
# Second Sunday (Sun on or after 8th day)
REM Sun 8 May WARN _warnfunc MSG %"Mother's day%" is %k (%xd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment