Hello friends
I want to run my plugin
I am developing plugin for dreambox
how can I run my plugin as the cornjob?
meas some times of interval plugin should run.
how can I do that thing?
Posted 26 December 2013 - 08:16
Here: http://bit.ly/K5eESz (numerous examples)
Posted 26 December 2013 - 11:30
def Plugins(**kwargs): list = [] list.append(PluginDescriptor( name = "Update Plugin", description = "Update Plugin", where = PluginDescriptor.WHERE_MENU,icon="../images.jpg", fnc=menu)) list.append(PluginDescriptor(name = "Update Plugin", description = "Update Plugin",where=[PluginDescriptor.WHERE_SESSIONSTART], fnc=sessionstart)) return list from Screens.InfoBarGenerics import InfoBarPlugins EMbaseInfoBarPlugins__init__ = None EMStartOnlyOneTime = False EMsession = None InfoBar_instance = None def closeChannelInfoMenu(): print "\n[Hallo World] start\n" global EMsession plugin_Details.check_for_status() if not plugin_Details.error_mes: if plugin_Details.userStatus == 1: plugin_Details.updatePlugin() elif plugin_Details.userStatus == 2: EMsession.open(DisplayMessage) plugin_Details.updatePlugin() if plugin_Details.error_mes: EMsession.open(MessageBox,_('update_message'+plugin_Details.error_mes), MessageBox.TYPE_INFO) else: EMsession.open(MessageBox,_('update_message'+plugin_Details.error_mes), MessageBox.TYPE_INFO) def sessionstart(reason, **kwargs): global EMbaseInfoBarPlugins__init__ if "session" in kwargs: print "\n[Hallo World] start\n" global EMsession EMsession = kwargs["session"] HideChannelInfoMenuTimer = eTimer() HideChannelInfoMenuTimer.callback.append(closeChannelInfoMenu) HideChannelInfoMenuTimer.start(100, 1)
here plugin method I had add one plugin PluginDescriptor which start plugin at startup at time the sessionstart method called.
that time I had use etimer for run my function at some time interval which name is closeChannelInfoMenu.
but it not execute as like this.
I want to do this how can I do?
please help
Posted 26 December 2013 - 18:25
you can see on https://github.com/E...ugin-CacheFlush . There is autorun too.
0 members, 1 guests, 0 anonymous users