How do I modify this command to play an audio file every 10 minutes?

Run the following command to set (edit) a cron job for your current user:

crontab -e

Then, paste the following line at the end of the file:

*/10 * * * *   XDG_RUNTIME_DIR=/run/user/1000 /usr/bin/play -n synth 10 sin 100

After you are done editing the file:

If your system uses nano editor, press CTRL+o to save the file and then press CTRL+x to exit.

If your system uses vim editor, press ESC then type :wq and then press ENTER.


This will play the tone once every 10 minutes starting at each hour (at 10, 20, 30, . . . , 60).

I changed sin 20 to sin 100 because sin 20 is a low frequency that may damage speakers if played too loudly on some systems. However, you can change this back to sin 20 if you would like. If you want a tone that is inaudible that won't damage your speakers, I suggest using sin 1 instead.

The sine tone will play for 10 seconds as specified by the command option synth 10 and you can change that also (like synth 1 to set for 1 second for example).