With Mathematica 12.2 I can import a sound file like this:
f = Import["F:\\mysound.mp3", "Sound"]; and play it like this:
EmitSound[f]]; But how can I get it to play, and once only, at a scheduled time?
I've tried running this:
RunScheduledTask[EmitSound[f], {1}, AbsoluteTime[{2022, 4, 6, 22, 12, 0}]] but it doesn't do anything. I'm guessing this is because it runs once and then by the time the scheduled moment comes it isn't running.
Many thanks for any help with this.
(The deleter clicked to send a message saying "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." Thanks, deleter. And what was the trivial syntax error, incorrect capitalisation, spelling mistake, other simple mistake, or easily found page in the documentation?)
AbsoluteTime[{2022, 4, 6, 22, 12, 0}]]-AbsoluteTime[Now], which works fine. $\endgroup$