Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


time scheduling playlists
#1
Hi, anyone know how to schedule playlists in moode using crontab ?

also how to upload playlists from nextcloud to several Pis running moode ?
Reply
#2
I don't know with crontab, i would recommand systemd timer instead:

Code:
sudo systemd-run --unit=Playlist_Soul --on-calendar='2021-02-03 19:00' --timer-property=AccuracySec=500ms sh -c 'mpc clear; mpc load Soul; mpc play'

Will create a timer and a service for loading your playlist Soul at 19H today. You also can replace the mpc commands by a script if u want do more stuff.

To watch ur timers:
Code:
systemctl list-timers

To disable the timer:
Code:
sudo systemctl stop Playlist_Soul.timer

To reset the timers who failed:
Code:
sudo systemctl reset-failed
Reply
#3
I think i need a script done as I have many tasks I want Moode to carry out. If I was to post a job online for a freelancer to do this what language or particulars would I need to mention?

also want someone to write a script or show me how to integrate nextcloud to upload the music to the Pis.

I am not a programmer and know very little about raspberrys.

thanks very much for your help
Reply
#4
Thumbs Up 
(02-03-2021, 02:41 PM)TookaFace Wrote: I don't know with crontab, i would recommand systemd timer instead:

Code:
sudo systemd-run --unit=Playlist_Soul --on-calendar='2021-02-03 19:00' --timer-property=AccuracySec=500ms sh -c 'mpc clear; mpc load Soul; mpc play'

Will create a timer and a service for loading your playlist Soul at 19H today. You also can replace the mpc commands by a script if u want do more stuff.

To watch ur timers:
Code:
systemctl list-timers

To disable the timer:
Code:
sudo systemctl stop Playlist_Soul.timer

To reset the timers who failed:
Code:
sudo systemctl reset-failed

Cool
Reply


Forum Jump: