Posts: 139
Joined: Mar 2012
Reputation:
2
Hi Rob,
Yes a script would work. But it is more to change the genre of music according to the time. When I last was playing around I found that I would be adding songs to the end of the queue.
I guess executing two commands in one timer would work. ie timer1 (at say 3pm) play playlist1. Timer2 (at say 5pm) clear queue (playlist1 could still have songs/videos to play) Then play playlist2.
Does that make sense?
Posts: 1,292
Joined: Sep 2009
Reputation:
71
Oh, ok. I think I know what you mean. Basically you want a script that you can call at different times of day that will queue up different types of music, while also clearing out the current playlist.
The way you describe it is how I would do it. When the timer starts I would stop the currently playing song (if player is playing), then clear the playlist, load new playlist, and then start playing. Let me know if you need any help with the script.
Posts: 7
Joined: Jan 2013
Reputation:
0
Shameless bump. I would love this feature to work i am urine xbmc on à raspberry pi in my bedroom and i would like to add à sleep timer function and an alarm clock function. I wouldnlike to be woken by an audio or video file. Is there Amy wat i could be of Amy help?
Posts: 8
Joined: Nov 2012
Reputation:
0
Dear all
I downloaded the "Cron XBMC" script and I installed it xbmc running under ubunti 12.04.
I modified the cron.xml file as following (I want run a shell script)
<cron>
<job name="TEST" command="System.Exec(/home/ferrari/test)" expression="*/5 * * * *" show_notification="true"/>
</cron>
the shell script is
#! /bin/bash
touch /home/ferrari/test.txt
It works correctly. Every five minutes the file test.txt is created in the ferrari folder.
Then I tried the same in xbmc installed in Raspberry-pi with OpenElec. Ofcourse I changed the pathname in the XML file as following:
<cron>
<job name="TEST" command="System.Exec(/storage/ferrari/test)" expression="*/5 * * * *" show_notification="true"/>
</cron>
and I changed also the script
#! /bin/bash
touch /storage/ferrari/test.txt
I changed the permission of folders:
chmod 777 storage
cd storage
chmod 777 ferrari
The service works (every five minutes the notification si shown on the screen) but the file test.txt is not created.
the tail of xbmc log file is
12:00:00 T:2953208928 NOTICE: service.cronxbmc: running command TEST
12:00:00 T:2953208928 NOTICE: service.cronxbmc: TEST will run again on 01-21-2013 12:05
12:00:00 T:3043398160 NOTICE: ProcessMessage: Failed to suspend AudioEngine before launching external program
12:00:00 T:3043398160 FATAL: ProcessMessage: Failed to restart AudioEngine after return from external player
12:05:00 T:2953208928 NOTICE: service.cronxbmc: running command TEST
12:05:00 T:2953208928 NOTICE: service.cronxbmc: TEST will run again on 01-21-2013 12:10
12:05:00 T:3043398160 NOTICE: ProcessMessage: Failed to suspend AudioEngine before launching external program
12:05:00 T:3043398160 FATAL: ProcessMessage: Failed to restart AudioEngine after return from external player
12:10:00 T:2953208928 NOTICE: service.cronxbmc: running command TEST
12:10:00 T:2953208928 NOTICE: service.cronxbmc: TEST will run again on 01-21-2013 12:15
12:10:00 T:3043398160 NOTICE: ProcessMessage: Failed to suspend AudioEngine before launching external program
12:10:00 T:3043398160 FATAL: ProcessMessage: Failed to restart AudioEngine after return from external player
Have you any solution about it ?
How can I fix the error ?
Thank you very much for your help and cooperation
Posts: 1,292
Joined: Sep 2009
Reputation:
71
Try using "chmod -R 777" on the ferrari folder. Also make sure your bash script is set to chmod +x for whatever user xbmc runs under on openelec. I've seen weird file permissions issues on openelec systems before since they try very hard to keep everything locked down and as appliance-like as possible. Good for the average user, but tricky when trying to do anything advanced.
Posts: 8
Joined: Nov 2012
Reputation:
0
Dear all,
>Try using "chmod -R 777" on the ferrari folder. Also make sure your bash script is set to chmod +x for whatever user xbmc runs under on >openelec. I've seen weird file permissions issues on openelec systems before since they try very hard to keep everything locked down >and as appliance-like as possible. Good for the average user, but tricky when trying to do anything advanced.
OK!!! It works!!
Thank you very much!!