LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices



Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Old

Simple "at"-like script thingie to run other things at a given time

Posted 05-31-2014 at 02:00 PM by the dsc (linux-related notes)
Updated 05-31-2014 at 02:16 PM by the dsc (bad phrasing/grammar)
Tags lazyness

Code:
#!/bin/bash
now=$(date +%s)
then=$(date --date "$1" +%s)
sleep $((then-now))
I was just tired to try to figure the syntax and usage of "at", when I just wanted gxmessage to pop up to remind me of something.

Usage: "when 17:20 && gxmessage whatever or whatever you want to start at 17:20"

Change "when" to whatever name you wish to call it. Perhaps "by" is more grammatically...
Member
Posted in Uncategorized
Views 226 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 03:18 PM.

Main Menu
Advertisement

Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration