• 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
[RELEASE] - The Scheduler
#61
(2013-06-05, 20:18)brotbuexe Wrote: I setup 3 custom scripts, but only 2 are detected at startup:

403 20:12:36 T:7964 DEBUG: [service.scheduler] - Setting Settings Load Interval: 86400 seconds
407 20:12:36 T:7964 DEBUG: [service.scheduler] - cdart_manager_running: False
408 20:12:36 T:7964 DEBUG: [service.scheduler] - cdart_manager_update: False
409 20:12:36 T:7964 DEBUG: [service.scheduler] - Current Day: Wednesday
410 20:12:36 T:7964 DEBUG: [service.scheduler] - Current Time: 20:12
417 20:12:36 T:7964 NOTICE: [service.scheduler] - Starting Custom 1 Hourly Schedule, every 8 Hours
418 20:12:36 T:7964 NOTICE: [service.scheduler] - Starting Custom 2 Hourly Schedule, every 8 Hours
419 20:12:36 T:7964 DEBUG: [service.scheduler] - Adjusting Testing time
420 20:12:36 T:7964 DEBUG: [service.scheduler] - Current Value: 03:00
421 20:12:36 T:7964 DEBUG: [service.scheduler] - Current Interval: 15
422 20:12:36 T:7964 DEBUG: [service.scheduler] - Test time: 03:15
423 20:12:36 T:7964 DEBUG: [service.scheduler] - Adjusting Testing time
424 20:12:36 T:7964 DEBUG: [service.scheduler] - Current Value: 03:00
425 20:12:36 T:7964 DEBUG: [service.scheduler] - Current Interval: 16
426 20:12:36 T:7964 DEBUG: [service.scheduler] - Test time: 03:16
427 20:12:36 T:7964 NOTICE: [service.scheduler] - Starting music Library Hourly Schedule, every 1 Hours
428 20:12:36 T:7964 DEBUG: [service.scheduler] - Setting Sleep Interval: 900 seconds


<setting id="custom1_cycle" value="2" />
<setting id="custom1_day" value="0" />
<setting id="custom1_disable_music" value="false" />
<setting id="custom1_disable_video" value="false" />
<setting id="custom1_interval" value="3" />
<setting id="custom1_script" value="Runscript(script.artwork.downloader, mediatype=movie)" />
<setting id="custom1_time" value="00:00" />
<setting id="custom2" value="true" />
<setting id="custom2_cycle" value="2" />
<setting id="custom2_day" value="0" />
<setting id="custom2_disable_music" value="false" />
<setting id="custom2_disable_video" value="false" />
<setting id="custom2_interval" value="3" />
<setting id="custom2_script" value="RunScript(script.artwork.downloader, mediatype=tvshow)" />
<setting id="custom2_time" value="00:30" />
<setting id="custom3" value="true" />
<setting id="custom3_cycle" value="2" />
<setting id="custom3_day" value="0" />
<setting id="custom3_disable_music" value="false" />
<setting id="custom3_disable_video" value="false" />
<setting id="custom3_interval" value="3" />
<setting id="custom3_script" value="CleanLibrary(video)" />
<setting id="custom3_time" value="00:00" />

custom3 never runs.

btw, I fixed the other issue by removing the " and not self.delay_video_library" from the line in the script.


same for me 2 custom works but above 3,4,5 doesn't works can you fix please

also it was amazing to execute a file texte with many action in one command :

SetVolume(80%)
RunScript(path)
UpdateLibrary(database,[path])
Notification(UPDATE,In progress[,2])

thx for this great script Smile
Reply
#62
Just noticed this as well, has gifte commented on this anywhere?
Reply
#63
(2013-06-12, 12:48)nikothebouriko Wrote: also it was amazing to execute a file texte with many action in one command :

SetVolume(80%)
RunScript(path)
UpdateLibrary(database,[path])
Notification(UPDATE,In progress[,2])

thx for this great script Smile

How did you make this work? I tried Runscript(d:\xbmc\...custom.py) or just d:\xbmc\...custom.txt and it does not work.
Reply
#64
(2013-07-25, 17:46)brotbuexe Wrote:
(2013-06-12, 12:48)nikothebouriko Wrote: also it was amazing to execute a file texte with many action in one command :

SetVolume(80%)
RunScript(path)
UpdateLibrary(database,[path])
Notification(UPDATE,In progress[,2])

thx for this great script Smile

How did you make this work? I tried Runscript(d:\xbmc\...custom.py) or just d:\xbmc\...custom.txt and it does not work.

My solution.

Because I want the script run at xbmc start too I created a autoexec.py and put it in userdata.

Code:
import xbmc
xbmc.executebuiltin('Notification(Scheduler,Run Update Library,4000)', True)
xbmc.executebuiltin('UpdateLibray(video)', True)
xbmc.executebuiltin('Notification(Scheduler,Run Clean Library,4000)', True)
xbmc.executebuiltin('CleanLibrary(video)', True)
xbmc.executebuiltin('Notification(Scheduler,Run Artwork Downloader Movies,4000)', True)
xbmc.executebuiltin('Runscript(script.artwork.downloader,mediatype=movie)', True)
xbmc.executebuiltin('Notification(Scheduler,Run Artwork Downloader TV-Shows,4000)', True)
xbmc.executebuiltin('Runscript(script.artwork.downloader,mediatype=tvshow)', True)

See:
http://wiki.xbmc.org/index.php?title=Autoexec.py
http://wiki.xbmc.org/index.php?title=Bui...rom_python

Now just add "RunScript(d:\xbmc\userdata\autoexec.py)" as a custom schedule.
Reply
#65
Just curious if anyone was able to fix the issue with only the first two custom schedules working? Or what other people are doing? I like to issue a few reboots, if i let xbmc sit for a few days asleep it freezes, i dont know if its a memory leak in xbmc or the skin im using or what, but i hoped to schedule a few reboots in custom schedules 3, 4, but those dont work.
Reply
#66
(2012-11-28, 05:25)Lunatixz Wrote:
(2012-11-27, 13:23)simonk83 Wrote: So, can anyone tell me how I'd go about using this to run Artwork Downloader once a day Big Grin Just want to make sure I get the function right (not sure if AD is a script, addon or plugin)...

I think it's an addon, so RunAddon(id) (but how do I find out the id)

EDIT: Or is it: RunScript(script.artwork.downloader, mediatype=?, dbid=?)

as per http://wiki.xbmc.org/index.php?title=Add...Downloader ?

Use RunScript(script.artwork.downloader)

have you got it working?

(2012-11-28, 05:29)simonk83 Wrote: Thanks. Sounds like a certain someone may have blocked it, but I'll give it a go later.

There's not much difference from me manually running AD once a day, or letting something do it automatically. The only difference is an annoyance to me (and everyone else) really. The impact on the site is exactly the same.

I'm actually more likely to manually run the script more than once a day as my stuff comes in, whereas if it were automatic I'd just leave it be.

Ah well, not much we can do about that I suppose.

Have you found any solution to this?
Reply
#67
Started working on this again.. New version available. -> https://skydrive.live.com/redir?resid=61...ile%2c.zip
Reply
#68
Giftie, quick question, I noticed the CEC commands in the the list of XBMC built in commands. Do any of the CEC options allow you to send a power on signal to a TV? Reason..

Raspberry Pi powered alarm clock. 6:30 hits, TV turns on, and the Pi after a few seconds starts playing music. Could also use the scheduler here to slowly raise the volume over time.
Current: Nvidia Shield TV (2nd Gen)
Retired: Asus M004u Chromebox - LibreELEC 7.0.1 | Raspberry Pi 2 - OpenELEC 6.0.3 | Apple TV w/ BCM70015 - CrystalBuntu 2.0 | Raspberry Pi - Model B - OpenElec Kodi 15
Reply
#69
I have a problem.
Trying to run on schedule export data from the video library. The logs (scheduler.log) run this job no.

Pyayus run as:
     <setting id="custom3" value="true" />
     <setting id="custom3_cycle" value="1" />
     <setting id="custom3_day" value="0" />
     <setting id="custom3_disable_music" value="false" />
     <setting id="custom3_disable_video" value="false" />
     <setting id="custom3_interval" value="3" />
     <setting id="custom3_script" value="exportlibrary(video,true,true,true,true)" />
     <setting id="custom3_time" value="14:00" />

Took as a basis http://wiki.xbmc.org/index.php?title=Lis..._functions
exportlibrary(video,true,thumbs,overwrite,actorthumbs) The video library is exported to multiple files with the given options. Here thumbs, overwrite and actorthumbs are boolean values (true or false).

Any ideas?
Reply
#70
(2014-01-22, 09:49)Timon_Crazy Wrote: I have a problem.
Trying to run on schedule export data from the video library. The logs (scheduler.log) run this job no.

Pyayus run as:
     <setting id="custom3" value="true" />
     <setting id="custom3_cycle" value="1" />
     <setting id="custom3_day" value="0" />
     <setting id="custom3_disable_music" value="false" />
     <setting id="custom3_disable_video" value="false" />
     <setting id="custom3_interval" value="3" />
     <setting id="custom3_script" value="exportlibrary(video,true,true,true,true)" />
     <setting id="custom3_time" value="14:00" />

Took as a basis http://wiki.xbmc.org/index.php?title=Lis..._functions
exportlibrary(video,true,thumbs,overwrite,actorthumbs) The video library is exported to multiple files with the given options. Here thumbs, overwrite and actorthumbs are boolean values (true or false).

Any ideas?

Did you restart the addon after changing the settings? This is done by restarting XBMC or disabling then re-enabling the add on. Otherwise, it refreshes the settings every 24 Hours.
Reply
#71
Yes. I restarted XBMC. Other tasks schedules , type :
    <setting id="custom1_cycle" value="1" />
    <setting id="custom1_day" value="0" />
    <setting id="custom1_disable_music" value="false" />
    <setting id="custom1_disable_video" value="false" />
    <setting id="custom1_interval" value="3" />
    <setting id="custom1_script" value="Runscript(script.artwork.downloader,mediatype=tvshow)" />
    <setting id="custom1_time" value="07:30" />
    <setting id="custom2" value="true" />
    <setting id="custom2_cycle" value="1" />
    <setting id="custom2_day" value="0" />
    <setting id="custom2_disable_music" value="false" />
    <setting id="custom2_disable_video" value="true" />
    <setting id="custom2_interval" value="3" />
    <setting id="custom2_script" value="Runscript(script.artwork.downloader,mediatype=movie)" />
    <setting id="custom2_time" value="08:30" />

Worked perfectly . What can be seen in the logs :
Wednesday - 06:16 - cdart mode Tiggered - Built-in function call - RunScript (script.cdartmanager, autoall)
Wednesday - 07:37 - custom1 mode Tiggered - Built-in function call - Runscript (script.artwork.downloader, mediatype = tvshow)
Wednesday - 08:37 - custom2 mode Tiggered - Built-in function call - Runscript (script.artwork.downloader, mediatype = movie)

Repeated restart does not correct the situation.

For information, sorry not immediately reported :
Frode , the latest stable version , MacOs 10.6 C

Windows 8 on the PC , also the same problem with this task imeeno exports. I was not wrong with the parameters ?
In case of an unsuccessful launch the task is displayed in the log ?
Reply
#72
Solved the problem. Security was enabled: login to the system settings and the entrance to the Add-ons Manager.
After disabling protection - Export video started working.
Reply
#73
There is also an error causing schedule 3 not to fire.
Reply
#74
I was just trying this script and I'm having some issues:

I'm trying to run a .py file I know works if I run it manually. But I would like it to run on a schedule.

I have it setup as:
<setting id="custom1_script" value="RunScript(/home/david/clean.py)" />

But I'm getting the error below. I have reset it to the default and left it as is. I enabled/disabled the script, added the above string to the xml and still nothing.. I'm running 12.3 Frodo, and verion 1.0 of your script.


15:06:32 T:140693190170368 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 'custom1_interval'
Traceback (most recent call last):
File "/home/david/.xbmc/addons/service.scheduler/default.py", line 850, in <module>
script.start()
File "/home/david/.xbmc/addons/service.scheduler/default.py", line 844, in start
self.schedule_check()
File "/home/david/.xbmc/addons/service.scheduler/default.py", line 569, in schedule_check
xbmc.log( "[service.scheduler] - Starting Custom 1 Hourly Schedule, every %s Hours" % self.custom1_interval, xbmc.LOGNOTICE )
AttributeError: Scheduler instance has no attribute 'custom1_interval'
-->End of Python script error report<--
Reply
#75
Script is running into problems when set to hourly.
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
  • 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7

Logout Mark Read Team Forum Stats Members Help
[RELEASE] - The Scheduler2