I've got updated code based on 0.5.0 that will allow you to run any command that can be run by xbmc.executebuiltin. You can run as many as you want with separate lines in a cron.txt file. The code as well as a patch file for service.py is available at https://github.com/pkscout/service.libra...update.exp
. The readme was updated as well just to add an explanation of what I did.
Basically, service.py now looks for cron.txt in the addon's data folder. If it finds one, it loops through each line and runs it through the same logic as the library update and then runs whatever command you stick at the end.
Here's the cron.txt I have right now:
45 6 * * * RunPlugin(plugin://plugin.video.hulu/?mode='QueueLibrary')
30 6 * * * UpdateLibrary(music)
15 * * * * UpdateLibrary(video)
That runs the Hulu queue update at 6:45am, a music library update at 6:30am, and video library updates 15 minutes after every hour.
This is set as an easter egg right now. There is no setting to enable or disable it, and no way to set a different path for the cron.txt file. That could certainly be done, but for now enabling advanced timers gets you the extra functionality.
I'm pretty sure I could get this to run any command, but given the number of platform specific ways to run native commands, I wasn't sure it was worth it.
I also included some code to create the addon datadir if it doesn't exist. This might not matter if you install the plugin through the XBMC repo (or a zip file), but when I created the plugin directory by hand and put the code in, it generated an error that the datadir wasn't there until I went into the settings. Lastly, I truncated the last_run seconds down to the minute. By doing that, the updates run at the top of the minute rather than sometime during that minute. That's an ADD thing with me. I'll live if that doesn't get incorporated into an actual release.