Program Sleep at a defined time

Goodmorning everyone!
I installed Volumio version 2.526 on a Raspberry Pi 3 B + and I need to sleep the music at a certain time every day.
I know that with sleep I can set the hours of operation but I’m trying to set an exact time.
Can someone help me?

As a workaround, you could use a systemd timer to issue a 'mpc pause or 'mpc toggle command. Don’t forget to post a feature request for it. Together with the Alarm function, it would work as a nice anti-burglar tool :slight_smile:
mpdpause.zip (1.29 KB)

Thanks Giulyx
I solved by setting up a crontab that stalls the MPC service at a certain time.
I keep the attached files you sent me when I needed them
Thanks again

Suggestion: instead of using mpc, use

volumio stop

This will stop anything on volumio and will leave it in a clean state.

Thanks Michelangelo!!!

I couldn’t run volumio stop in cron.
But curl localhost:3000/api/v1/commands/?cmd=stop in cron is working.

Does anyone know where can i find config or code of SLEEP setting, to change setup logic to defined time in frontend?

hi,

i tried to activate the sleep-timer-function via WebSockets API with this commands:

     volumio_emit([('setSleep', {"enabled": "true", "time": "00:05", "action": "stop"})])

but it didn’t work.

Something wrong with the notation?

Please help me! Thx!