[RELEASE] - The Scheduler

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
thebearnecessit Offline
Fan
Posts: 615
Joined: Jan 2012
Reputation: 3
Post: #51
i have added a script but it doesn't seem to work.

can you see anything wrong?

i have setup a script to run daily.

RunScript(d:/stuff/backups/scripts/slideshow.py)

when i put the same thing into my favourites.xml he script runs fine and starts up a slideshow.

but when i set it up through the scheduler nothing happens in xbmc.

this appears in my log: in this example i was making setings changes at 13:02 and telling it to run at 13:04 but asw you can see the slideshow didnt start at 13:04

Code:
12:59:19 T:1164  NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:47
12:59:19 T:3120  NOTICE: Thread Jobworker start, auto delete: true
13:03:02 T:3912  NOTICE: Previous line repeats 1 times.
13:03:02 T:3912  NOTICE: Thread Background Loader start, auto delete: false
13:03:02 T:3912 WARNING: XFILE::CFileFactory::CreateLoader - Unsupported protocol(addons) in addons://disabled/folder.jpg
13:03:02 T:3912 WARNING: XFILE::CFileFactory::CreateLoader - Unsupported protocol(addons) in addons://enabled/folder.jpg
13:03:02 T:3912 WARNING: XFILE::CFileFactory::CreateLoader - Unsupported protocol(addons) in addons://repos/folder.jpg
13:03:02 T:3912 WARNING: XFILE::CFileFactory::CreateLoader - Unsupported protocol(addons) in addons://install/folder.jpg
13:03:02 T:3912 WARNING: XFILE::CFileFactory::CreateLoader - Unsupported protocol(addons) in addons://search/folder.jpg
13:03:02 T:2088  NOTICE: Thread Jobworker start, auto delete: true
13:03:03 T:436  NOTICE: Thread Background Loader start, auto delete: false

my slideshow script is running everytime xbmc starts though! not sure why...

Code:
12:57:58 T:576  NOTICE: [service.scheduler] - Mode triggered: custom1
12:57:58 T:576  NOTICE: [service.scheduler] - Built-in Function: RunScript(d:/stuff/backups/scripts/slideshow.py)

any ideas?

thanks in advance Smile
(This post was last modified: 2013-04-02 14:08 by thebearnecessit.)
find quote
giftie Online
Skilled Python Coder
Posts: 2,042
Joined: Mar 2010
Reputation: 35
Post: #52
To get changes in the settings to work right away, you need to disable the addon then enable the add-on.
find quote
RavenNL Offline
Fan
Posts: 308
Joined: Jul 2011
Reputation: 1
Location: Netherlands
Post: #53
Not sure what I'm doing wrong but I have this addon working fine for 2 other scheduled tasks. Now I'm trying to add a new task that I want my client to turn off or go to sleep at a specific time. But whatever option I try I don't see anything happening. I tried to the following commands.

- powerdown
- xbmc.shutdown()
- xbmc.suspend()

Also when checking the scheduler log I don't see anything happening. And yes before I applied the new rule i disabled the addon. Am I using the incorrect commands?

[Image: watched-fanart.jpg]
(This post was last modified: 2013-04-12 20:35 by RavenNL.)
find quote
maschmaschmasch Offline
Junior Member
Posts: 1
Joined: Apr 2013
Reputation: 0
Post: #54
Do any of you kind folks mind explaining to me how I can get this addon to open a particular iPlayer stream (lets say BBC news) every morning? I have the requisite addons installed; just need help working out the script commands with which I can start the iPlayer addon / navigate to a particular stream.

Muchas gracias!
find quote
gatehead Offline
Junior Member
Posts: 3
Joined: Apr 2012
Reputation: 0
Post: #55
So I'm trying to build an alarm clock that wakes me up with the simpsons.
Tried PlayMedia("smb:\\<server>\<share>\TV_Simpsons.xsp") and it didn't work
Replace it with just "Mute" and i noticed it didnt work either.


wait an extra 15 minutes and then mute kicked it.
Scheduled time was 00:13 and it started at 00:26, even the log said this...

1st - Correct way to start a playlist
2nd - how can we confirm its firing at the right time, why would it be delayed?
3rd - could you add a 'test' button so we can see if the script syntax is ok.
find quote
giftie Online
Skilled Python Coder
Posts: 2,042
Joined: Mar 2010
Reputation: 35
Post: #56
(2013-04-23 03:31)gatehead Wrote:  So I'm trying to build an alarm clock that wakes me up with the simpsons.
Tried PlayMedia("smb:\\<server>\<share>\TV_Simpsons.xsp") and it didn't work
Replace it with just "Mute" and i noticed it didnt work either.


wait an extra 15 minutes and then mute kicked it.
Scheduled time was 00:13 and it started at 00:26, even the log said this...

1st - Correct way to start a playlist
2nd - how can we confirm its firing at the right time, why would it be delayed?
3rd - could you add a 'test' button so we can see if the script syntax is ok.

1. Don't use quotes around the path.
2. This script is not designed to be used as an alarm clock, it is not accurate enough. The script has a default delay of 15mins(check Extra Settings) This can be turned off and then the adjustment is available from 1min to 60min show up. With XBMC in Debug mode, the script logs every delay time interval. Also, you need to Disable then Re-enable the service script after making changes to the settings.
3. No place to add a test button... It runs in the background, no gui.

(2013-04-12 20:27)RavenNL Wrote:  Not sure what I'm doing wrong but I have this addon working fine for 2 other scheduled tasks. Now I'm trying to add a new task that I want my client to turn off or go to sleep at a specific time. But whatever option I try I don't see anything happening. I tried to the following commands.

- powerdown
- xbmc.shutdown()
- xbmc.suspend()

Also when checking the scheduler log I don't see anything happening. And yes before I applied the new rule i disabled the addon. Am I using the incorrect commands?

The proper command is Powerdown and Suspend(note the Capitalization on the first letter.) The Builtins need to be exactly the same as here http://wiki.xbmc.org/index.php?title=Lis..._functions

(2013-04-21 19:39)maschmaschmasch Wrote:  Do any of you kind folks mind explaining to me how I can get this addon to open a particular iPlayer stream (lets say BBC news) every morning? I have the requisite addons installed; just need help working out the script commands with which I can start the iPlayer addon / navigate to a particular stream.

Muchas gracias!

Internet streams sometimes change, so a direct command may not be possible.

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


(This post was last modified: 2013-04-23 08:14 by giftie.)
find quote
brotbuexe Offline
Junior Member
Posts: 43
Joined: May 2010
Reputation: 0
Post: #57
I get this error on 12.2, Addon Version 0.08:

05:40:17 T:3684 DEBUG: [service.scheduler] - Setting Settings Load Interval: 86400 seconds
05:40:17 T:3684 DEBUG: [service.scheduler] - cdart_manager_running: False
05:40:17 T:3684 DEBUG: [service.scheduler] - cdart_manager_update: False
05:40:17 T:3684 DEBUG: [service.scheduler] - Video Library Scan in progress
05:40:17 T:3684 DEBUG: [service.scheduler] - Current Day: Wednesday
05:40:17 T:3684 DEBUG: [service.scheduler] - Current Time: 05:40
05:40:17 T:3684 NOTICE: [service.scheduler] - Video Library Scan in Progress, delaying 60 Minutes
05:40:17 T:3684 NOTICE: Previous line repeats 2 times.
05:40:17 T:3684 NOTICE: [service.scheduler] - Starting Custom 3 Hourly Schedule, every 2 Hours

05:40:17 T:3684 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.AttributeError'>
Error Contents: Scheduler instance has no attribute 'delay_video_library'
Traceback (most recent call last):
File "D:\XBMC\portable_data\addons\service.scheduler\default.py", line 872, in <module>
script.start()
File "D:\XBMC\portable_data\addons\service.scheduler\default.py", line 866, in start
self.schedule_check()
File "D:\XBMC\portable_data\addons\service.scheduler\default.py", line 803, in schedule_check
elif self.video_library_cycle == 2 and not self.video_library_triggered and not self.delay_video_library:
AttributeError: Scheduler instance has no attribute 'delay_video_library'
-->End of Python script error report<--

This is on xbmc start and I set to update library on start in xbmc.
(This post was last modified: 2013-05-22 05:44 by brotbuexe.)
find quote
Post Reply