2012-03-07, 00:06
I've started writing an addon that will be a growth of the current XBMC Library Updater addon. Basicaly rather than just update your library, I want to make an addon that will let you schedule multiple XBMC functions to run via a cron-like scheduler. All of your timers can now be handled directly within XBMC.
Examples include:
Rebooting
Restart XBMC
Take a Screenshot
Run another Addon or Script
Play Media
Refresh RSS
Send a Notification
Set XBMC Volume
Update Music/Video Libraries
Additionally you can specifiy your timers to display an XBMC notification when they run. With most of the pieces were already in place from the updater addon I didn't think this would be too difficult.
What It Can Do So Far:
The cron jobs themselves are in an xml format
This will also allow some growth if we want to include other things via the GUI in time.
I also have a basic GUI started (see screenshot). I tried to modify the the RSS Editor addon dialog to serve as a job creator/editor, but this is where I got stuck.
Update - 01/08/2017
After growing rather frustrated with the dated GUI code I started over. New version is for Jarvis+ and uses Kodi integrated GUI elements for the display. Not quite as pretty as the old one but all the functionality is there.
Update - 4/22/2012
I've moved all the code for this addon to Github. I'm trying to consolidate all my projects there, plus it will be easier for someone to pick up with should anyone ever be interested. Everything in the release is exactly the same, just a new location.
Cron XBMC on Github - https://github.com/robweber/cronxbmc
Update - 3/02/2015
Due to some interest by third party developers I've updated this addon for Helix to use some more updated service addon functions. I've also added a module extension point so you can import the service.cronxbmc module in your own addons. To interface with the cron.xml file via the CronManager to so as follows:
Examples include:
Rebooting
Restart XBMC
Take a Screenshot
Run another Addon or Script
Play Media
Refresh RSS
Send a Notification
Set XBMC Volume
Update Music/Video Libraries
Additionally you can specifiy your timers to display an XBMC notification when they run. With most of the pieces were already in place from the updater addon I didn't think this would be too difficult.
What It Can Do So Far:
The cron jobs themselves are in an xml format
Code:
<job name="Job Name" expression="* * * * *" command="XBMCCommand()" show_notification="true/false" />
This will also allow some growth if we want to include other things via the GUI in time.
I also have a basic GUI started (see screenshot). I tried to modify the the RSS Editor addon dialog to serve as a job creator/editor, but this is where I got stuck.
Update - 01/08/2017
After growing rather frustrated with the dated GUI code I started over. New version is for Jarvis+ and uses Kodi integrated GUI elements for the display. Not quite as pretty as the old one but all the functionality is there.
Update - 4/22/2012
I've moved all the code for this addon to Github. I'm trying to consolidate all my projects there, plus it will be easier for someone to pick up with should anyone ever be interested. Everything in the release is exactly the same, just a new location.
Cron XBMC on Github - https://github.com/robweber/cronxbmc
Update - 3/02/2015
Due to some interest by third party developers I've updated this addon for Helix to use some more updated service addon functions. I've also added a module extension point so you can import the service.cronxbmc module in your own addons. To interface with the cron.xml file via the CronManager to so as follows:
Code:
from cron import CronManager,CronJob
manager = CronManager()
#get jobs
jobs = manager.getJobs()
#delete a job
manager.deleteJob(job.id)
#add a job
job = CronJob()
job.name = "name"
job.command = "Shutdown"
job.expression = "0 0 * * *"
job.show_notification = "false"
manager.addJob(job)
#Please be aware that adding or removing a job will change the job list (and change job ids) so please refresh your job list each time by using:
jobs = manager.getJobs()
#This will also pull in any new jobs that may have been added via other methods