LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-17-2010, 07:52 AM   #1
torz
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Rep: Reputation: 0
googlecl calendar entry


Hi,

Anyone knows how to add a calendar event to google calendar with googlecl 2 minutes from current time?
The idea is to add a new entry to the calendar 2 minutes from now with reminder set to 1 minute before the event. So I could set google calendar to send me a text message alert. I want to set up monitoring on my server so if anything happens I could get a text within 60 sec.
I have checked the documentation but there is nothing there about adding a new event in 2 min. I also tried to do
"# googlecl calendar add "text here in 2 minutes" --reminder 1m"
all i got is an event staring now and last for 2 minutes. No alert was sent.
Thanks
 
Old 10-26-2010, 08:32 PM   #2
marleo
LQ Newbie
 
Registered: Oct 2010
Posts: 1

Rep: Reputation: 0
If you're on Linux or something similar, you could use the date command to do the thinking for you...

google calendar add "test event today from `date -d "now + 2 minutes" +%H:%M`"

Use "man date" to see what's going on, but basically, the -d switch lets you specify a date other than now (and it speaks some common formats) and the + bit controls the output format. So the stuff between the `` backticks comes out as 12:05 if it's currently 12:03.
 
Old 10-27-2010, 03:37 AM   #3
torz
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks

thanks a lot marleo
This solution is exactly what i need
the way I tried was:

hour=`date +%H`
min=`date +%M`
plus=$(( $min + 2 ))
now="$hour:$plus"
/usr/bin/google calendar add "test at $now" --reminder 1m

but I had problem from hh:58. then I did case for 58 and 59 and the rest of minutes just add 2 but it was getting way too complicated for this simple thing.

Thanks again
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
add past event with googlecl to Google Calendar m4rtin Linux - Software 0 08-22-2010 06:41 PM
LXer: GUI For GoogleCL Script 0.1 LXer Syndicated Linux News 0 06-25-2010 01:50 PM
Using gcaldaemon to synchronize calendar to google calendar seanybaby Linux - Software 1 12-15-2009 02:30 PM
How to share between Outlook Calendar and a Linux calendar program domino1241 Linux - General 2 07-09-2006 09:13 PM
prompt based calendar program? Calendar? thebeaglebeagle Linux - Software 0 09-15-2003 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
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