7

I am using the alarm-clock application and the alarm-clock-applet, and the only frequency I can set, are for days of the week. I want an hourly alarm, is there any way to do that? Googling did not provide any answers, neither did AU, seems like no one has asked this question ever before. ATM, I use crontab to fire a notify-send each hour. Any other application/methods?

Thanks.

1

Keyboard preferences has a typing break monitor that can be triggered hourly. Doesn't trigger if you have breaks in your work.

If it doesn't fit your needs it may be a good starting point to develop your own alarm.

| improve this answer | |
2

You can use the below python script not only for setting an hourly alarm, but for setting an alarm with any time interval. Firstly create a new file alarm.py, using vi alarm.py . Then paste the following code in the file,

#!/usr/bin/env python2 import pynotify from pygame import mixer from time import sleep def sendmessage(title, message): pynotify.init("Test") notice = pynotify.Notification(title, message) notice.show() return while True: mixer.init() #you must initialize the mixer alert=mixer.Sound('beep.wav') #name of the sound file is beep.wav alert.play() sendmessage("ALARM!!", "1 hour up!") sleep(3600)

Here, beep.wav is the name of the sound file which should also be in the same directory as of the alarm.py file (preferably home folder). You can download any beep sound file of your choice from the internet.

Now make the file executable by,

chmod +x alarm.py

Now to run this in background,

nohup /home/'username'/alarm.py &

(this is when alarm.py is in the home folder, use the appropriate file address as required)

and hit Enter twice. Now this process will be running in background, if you want to stop this, type,

ps ax| grep alarm.py 

and type,

kill process_id

Currently, the time interval is 1 hour. If you want to change it, change the line sleep(3600) to sleep(no_of_seconds) [IN this case, 3600 = 60*60 seconds = 1 hour.]

Hope it helped!

| improve this answer | |
2

Sounds like an App request to me Kaustubh or at least a feature request for alarm-clock. In the meantime if you don't understand cron you can use the gnome-schedule application to give you a gui way of adding your reminders.

sudo apt-get install gnome-schedule
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.