LinuxQuestions.org
Help answer threads with 0 replies.
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 01:00 PM by the dsc (linux-related notes)
Updated 05-31-2014 at 01: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 845 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 03:53 AM.

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
Open Source Consulting | Domain Registration