8
submitted 1 day ago* (last edited 1 day 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.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here
this post was submitted on 14 Feb 2026
8 points (100.0% liked)

linux4noobs

3208 readers
4 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