Cron for Kodi - Support Thread (formally CronXBMC) - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151) +---- Thread: Cron for Kodi - Support Thread (formally CronXBMC) (/showthread.php?tid=124888) |
RE: Cron XBMC - Help Wanted - el_Paraguayo - 2015-01-21 (2015-01-21, 05:37)ykhehra1 Wrote: For example a script which shows notification text box, but instead of timer showing it while video is on, I want it to wait till video ends.If you're just talking about notifications from your script, I imagine that's fairly easy to do. I've written a bit of code to handle an issue with multiple notifications (the display time isn't honoured). This works by passing the notification requests to a separate thread and sleeping for the right amount of time before displaying the next notification. It would be a very minor change to check that there were no active players (e.g. music or video) before displaying a notification. However, the above idea has nothing to do with cron so best not discussed in this thread. If the above idea is of interest, start a new thread and I'll share some code. RE: Cron XBMC - Help Wanted - pieman - 2015-02-28 (2013-11-15, 17:17)robweber Wrote: The GUI was originally made by Kr0nZ as I don't have a lot of GUI experience. I tried it out myself and it appears that editing configured commands is not possible. The program is not crashing XBMC for me when exiting though. Please attach a debug log of your system to see where the problem might be. If Kr0nZ is still monitoring this thread perhaps he can help with the editing commands issue. I have just posted similar findings on an earlier post on your github. GUI is ok with Windows but not fully functional with Openelec or Raspbian on a Raspberry Pi. This is with Gotham and Helix and the GUI is crashing Kodi. I will do further tests asap. We also have linux and Android devices so we will test for these in due course. Despite the GUI crashing Kodi the new task is saved in cron.xml when you click Add Job and your service runs as expected when Kodi restarts. Extract below of the entries in the log when the GUI crashes Kodi. Code: 13:17:37 T:2911622160 NOTICE: Cron XBMC service starting.... The last row of the log shown above is the last entry in the log before the crash. Could people perhaps post details of what systems they are using Cron XBMC on and indicate if the GUI is crashing Kodi for them or working as intended. RE: Cron XBMC - Help Wanted - robweber - 2015-03-02 I found some issues with the gui file and tried to address them. I'm really not the best at this kind of work but hopefully what I did will be a passable fix. On Windows it didn't crash the system but there was an error. On another note I've drastically updated the addon today. These fixes are all for Helix only. There were some significant performance improvements using the new xbmc.Monitor methods for service addons, as well as checking the cron.xml file modification time so I'm not just reading in this file constantly. I've also added a way to interface with the addon using a python module instead of having to read/write to the cron.xml file directly. Here is a simple example. First add the following import to your custom addon in the "requires" section: <import addon="service.cronxbmc" version="0.0.4" /> Next import the right classes and interact with them Code: from cron import CronManager,CronJob RE: Cron XBMC - Help Wanted - pieman - 2015-03-02 (2015-03-02, 21:09)robweber Wrote: I found some issues with the gui file and tried to address them. I'm really not the best at this kind of work but hopefully what I did will be a passable fix. On Windows it didn't crash the system but there was an error. Looks a lot better than our hack of your cron.xml. I will work through your solution asap. RE: Cron XBMC - Support Thread - robweber - 2015-03-02 Wow, that was fast. If you want to be sure it is working I did add some log entries, when the cron scheduler reads in the new file it will log: "File update, loading new jobs" and then list the name of the jobs as it loads them. At least you can be sure it is finding your changes. Let me know how it works, I mocked up a very simple test addon to make sure the module imported but can't say it was super comprehensive. RE: Cron XBMC - Support Thread - pieman - 2015-03-02 robweber, Is there an easy way for us to install your Addon when we install ours i.e. can our zip file be made to call your zip file (if that makes sense)? RE: Cron XBMC - Support Thread - robweber - 2015-03-02 If you package stuff in a repo you can add the service.cronxbmc addon as a required dependency. It has to be done in a repo through or it won't know where to look. All you would need for this is some place to host the files - I use an internal webserver at my house to distribute stuff. I don't have this addon in the official repo so it can't be automatically found. http://kodi.wiki/view/HOW-TO:Create_a_repository_for_add-ons RE: Cron XBMC - Support Thread - pieman - 2015-03-02 (2015-03-02, 23:34)robweber Wrote: If you package stuff in a repo you can add the service.cronxbmc addon as a required dependency. It has to be done in a repo through or it won't know where to look. All you would need for this is some place to host the files - I use an internal webserver at my house to distribute stuff. I don't have this addon in the official repo so it can't be automatically found. I have external servers where I host my Addons so I will look at setting up repository. On a fresh install of Helix on Ubuntu (14.04 LTS) it installs your latest version without any problems but the GUI still crashes Kodi. I'll try deleting the old directories on Windows and Pi to see if I can install your new version (currently have dependency issues etc). RE: Cron XBMC - Support Thread - robweber - 2015-03-03 Does the gui only crash when you try to exit? I was testing it on Windows so I wasn't sure if the platform would make a difference. I can try and dig through the gui code some more. RE: Cron XBMC - Support Thread - pieman - 2015-03-03 (2015-03-03, 01:37)robweber Wrote: Does the gui only crash when you try to exit? I was testing it on Windows so I wasn't sure if the platform would make a difference. I can try and dig through the gui code some more.Yes it only crashes when you exit the GUI. Ok in Windows but not Linux, Debian etc. RE: Cron XBMC - Support Thread - robweber - 2015-03-03 Interesting. I'll try it on Linux tomorrow and see what I can find out. RE: Cron XBMC - Support Thread - pieman - 2015-03-04 (2015-03-02, 21:09)robweber Wrote: I found some issues with the gui file and tried to address them. I'm really not the best at this kind of work but hopefully what I did will be a passable fix. On Windows it didn't crash the system but there was an error. We modified our Addon to make use of the import of cron. The cron changes work for adding and deleting entries if we manually run our Addon but cron doesn't seem to be firing up our Addon as it was before you made the changes. Could you explain a little more the changes you made with xbmc.Monitor as we are not seeing anything in the logs at the cron scheduled time. When we manually run our Addon we get the log entries below and they show up within cron xbmc's gui but they are not triggering. Code: 00:39:04 T:45744 NOTICE: service.cronxbmc-0.0.4 : File update, loading new jobs RE: Cron XBMC - Support Thread - pieman - 2015-03-04 Disregard my last post. I restarted Kodi and Cron XBMC seems fine again now. RE: Cron XBMC - Support Thread - robweber - 2015-03-05 I've noticed this behavior sometimes with service addons. If they are updated it takes a reboot to actually halt the old service and restart them correctly. RE: Cron XBMC - Support Thread - privado - 2015-03-25 +1 on cron xbmc crashing openelec on linux. |