Score:0

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

in flag

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

*/15 * * * *   XDG_RUNTIME_DIR=/run/user/1000 /usr/bin/play -n synth 10 sin 20
jpbrain avatar
ca flag
Hi. hhhm... switch 15 by 10. or "0,10,20,30,40,50 * * * * "
mchid avatar
bo flag
That's a super low frequency. Be careful not to blow your speakers. Something like `sin 100` might be more reasonable for most people.
mchid avatar
bo flag
If you want a tone that is inaudible that won't damage your speakers, I suggest using `sin 1` instead of `sin 20`.
Score:1
bo flag

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).

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.