Replacement for alarm clock

I am trying to find a replacement for the alarm clock applet.

The problem with it is that you have to pick the sound every time.

I need something that lets you save settings.

Thanks.

Hi @fixit7,

the following package is for 17.10, that might help if you are running anything older like 16.04?:

https://www.ubuntuupdates.org/package/core/artful/universe/base/alarm-clock-applet

I don’t know what else you can use myself, sorry!. :frowning:

Thanks. I will see if someone has written a script for an alarm.

Hello fixit7,
There is a file called /etc/crontab which you can edit to run some other program at a certain time of day. You can also set it to do so only on certain days and whatever other refinements you want.

For example you could install a command line music player like mpg321 and write a line for it in crontab to have it play some song you have in your Music directory at whatever time you set. I think mpg321 can only play mp3 files so it has to be an mp3, or you could look for some other command line player which can play other formats.

 sudo apt install mpg321 
 gksudo pluma /etc/crontab 

Your crontab file will likely already have some operating system stuff already in it like mine,

# m h dom mon dow user	command
17 *	* * *	root    cd / && run-parts --report /etc/cron.hourly
25 6	* * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6	* * 7	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6	1 * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#

The columns are:
m for minutes, (you can put in any number here from 0 to 59, or an asterisk means every minute)
h for hours, (you can put in any number here from 0 to 23, or an asterisk means every hour)
the ‘dom’ column is for ‘day of the month’ from 1 to 31, or * for ‘every’ day
the ‘mon’ column is for ‘month of the year’ use a number 1 to 12 or type ‘march’, or * for ‘every’
the ‘dow’ column is for ‘day of the week’, mon=1, tues=2, wed=3, thu=4, fri=5, sat=6, sun=7
the user column is for username, herman in my case, or possibly root
command: the ‘command’ column is for a command, (to play the music)

It’s a good idea to try running your mpg123 music player in your terminal first to make sure it works and you can use tab completion to get the right file path and name for your song. Some songs have bad file names which are not particularly terminal friendly.

 /usr/bin/mpg123 /home/herman/Music/name_of_song.mp3

Then when have tested it out in terminal and it works okay you can use it for the last part of your contab line.

So you can easily make up a line that looks something like this:

25 6 * * *  herman /usr/bin/mpg123 /home/herman/Music/name_of_song.mp3

So here’s what my crontab file will end up looking like,

[code]

m h dom mon dow user command

17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )

25 6 * * * herman /usr/bin/mpg123 /home/herman/Music/name_of_song.mp3 [/code]
Once I save and close the file my computer will play that song at 25 minutes past six every morning providing I leave the computer running.

EDIT: This method works for me in 16.04 but in later versions, (I also have an install of 17.10 ), I had some trouble getting things to work and ended up using ‘crontab -e’ instead, according to: Ubuntu Community Docs Cron Howto. I now recommend the method outlined in Ubuntu Community Docs for setting cron jobs in recent versions of Ubuntu.

2 Likes

There’s also gnome-clocks, https://wiki.gnome.org/Design/Apps/Clock
Gnome-clocks might be worth a try.

1 Like

alarm-clock-applet is still usable, and isfrom my point of view the best option available, way more than gnome-clock because it allow to choose the file you want for the alarm, I really like that part. Now I have one problem the native notification area/systray,the timer isn't shown while in ubuntu the ubuntu one it's the case. This would be the only downside. I thinkas an independent applet it would be better.