10
submitted 1 month ago* (last edited 1 month ago) by NewDawnOwl@lemmy.world to c/linux4noobs@programming.dev

I made a little script to get to grips with cron and to try to make my time management better :

If you want music to play, use ffmpeg/ffplay. If you want notifications, use notify-send. If you want neither, what are you doing reading this?

Save the following to chime.sh or whatever you want to call this

#! /bin/bash
# replace 1000 with your user id , run $ id -u to find out. this is to allow audio to play
export XDG_RUNTIME_DIR="/run/user/1000"
# checks what minute it is past the hour to play specific chime
case $(date +"%M") in
        15|30|45) ffplay -autoexit -nodisp /path/to/your/chime.mp3
        notify-send "BONG";;
        00) ffplay -autoexit -nodisp /path/to/your/hourly/chime.mp3
        notify-send "HOUR";;
        *) notify-send $(date +"%M");;
esac

run

chmod +x chime.sh

Or whatever you called the file.

run

crontab -e 

to open/config cron

Add

*/15 * * * * /path/to/your/chime.sh

This triggers the cron job every 15 mins. you can adjust the timings on both the cron config and the shell script to adjust how often you want chimes to go off.

top 10 comments
sorted by: hot top controversial new old
[-] magikmw@piefed.social 1 points 1 month ago

Hey, just wanted to mention I finally got around to this bookmark and implemented it on my system. Works great so far, I just need a cleaner sound because the chime I found is kinda noisy.

Thanks for this post.

Fighting Time Blindness one chime at a time.

[-] NewDawnOwl@lemmy.world 2 points 1 month ago

Fighting Time Blindness one chime at a time.

I feel so seen 🥲, thank you so much. I'm happy it helped you, thank you for letting me know it's useful to you.

I've had to up it to once every 10, and I'm considering lowering it to 5 or 6, and changing the case statement to be a division/modulus calcuation.

There's various sound effects on https://www.myinstants.com/ , I'm using one of the airhorn sounds from there 🙈

[-] magikmw@piefed.social 1 points 1 month ago

Oh I went for 20 minutes because it feels like it's not chasing me down and still useful. I often have to get going on the hour or at half hour so it's a good reminder for me without being annoying (yet).

My sound is a free airplane liner crew communication chime. For some reason it's tickling my brain right even though I really dislike flying (mostly the crowd, the noise and the uncomfortable space).

I'll look into th link, thanks.

[-] NewDawnOwl@lemmy.world 1 points 1 month ago

My sound is a free airplane liner crew communication chime

I just need a cleaner sound because the chime I found is kinda noisy.

I got you fam

https://www.myinstants.com/en/instant/intercom-chime-1-31642/

[-] magikmw@piefed.social 2 points 4 weeks ago

Thanks, this one is buzzy though. I'm way too bothered by audio issues, I might need to make one myself. Eventually.

[-] NewDawnOwl@lemmy.world 1 points 3 weeks ago
[-] toynbee@piefed.social 1 points 1 month ago
[-] NewDawnOwl@lemmy.world 2 points 1 month ago* (last edited 1 month ago)

oooooooo... I should try it.

EDIT : for others, you might need to set up/enable terminal bell

[-] DeltaWingDragon@sh.itjust.works 1 points 3 weeks ago* (last edited 3 weeks ago)

I use echo ^G

(That ^G is a literal control-G character, type control-V then control-G to get it, or Insert then control-G)

[-] toynbee@piefed.social 1 points 3 weeks ago

I respect that, but putting control characters in scripts feels wrong to me.

this post was submitted on 14 Feb 2026
10 points (100.0% liked)

linux4noobs

3208 readers
90 users here now

linux4noobs


Noob Friendly, Expert Enabling

Whether you're a seasoned pro or the noobiest of noobs, you've found the right place for Linux support and information. With a dedication to supporting free and open source software, this community aims to ensure Linux fits your needs and works for you. From troubleshooting to tutorials, practical tips, news and more, all aspects of Linux are warmly welcomed. Join a community of like-minded enthusiasts and professionals driving Linux's ongoing evolution.


Seeking Support?

Community Rules

founded 2 years ago
MODERATORS