Jump to content


Photo

how can I run my plugin as cronjob?


  • Please log in to reply
10 replies to this topic

#1 patelnaitik30

  • Senior Member
  • 43 posts

0
Neutral

Posted 25 December 2013 - 13:51

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?

 

 



Re: how can I run my plugin as cronjob? #2 MiLo

  • PLi® Core member
  • 14,049 posts

+298
Excellent

Posted 25 December 2013 - 14:18

eTimer
Real musicians never die - they just decompose

Re: how can I run my plugin as cronjob? #3 patelnaitik30

  • Senior Member
  • 43 posts

0
Neutral

Posted 26 December 2013 - 07:25

thanks for reply 

do you have example plugin for that?



Re: how can I run my plugin as cronjob? #4 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 26 December 2013 - 08:16

Here: http://bit.ly/K5eESz (numerous examples)


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: how can I run my plugin as cronjob? #5 patelnaitik30

  • Senior Member
  • 43 posts

0
Neutral

Posted 26 December 2013 - 10:27

can you please explain me how to run plugin at the some particular time interval?



Re: how can I run my plugin as cronjob? #6 patelnaitik30

  • Senior Member
  • 43 posts

0
Neutral

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



Re: how can I run my plugin as cronjob? #7 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 26 December 2013 - 13:28

Is it never executed?
Try
HideChannelInfoMenuTimer.start(1000, 0)
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: how can I run my plugin as cronjob? #8 patelnaitik30

  • Senior Member
  • 43 posts

0
Neutral

Posted 26 December 2013 - 13:35

Thanks for reply.

 

but is it possible to run after 1000 ms again?



Re: how can I run my plugin as cronjob? #9 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 26 December 2013 - 15:12

In closeChannelInfoMenu start the timer again. Calling
HideChannelInfoMenuTimer.start(1000, 0)
should be sufficient.
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: how can I run my plugin as cronjob? #10 littlesat

  • PLi® Core member
  • 56,371 posts

+692
Excellent

Posted 26 December 2013 - 15:15

The autobackup plugin can make an automatic backup at a specific time.... I would recommend to strip some code from there,


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: how can I run my plugin as cronjob? #11 ims

  • PLi® Core member
  • 13,626 posts

+212
Excellent

Posted 26 December 2013 - 18:25

you can see on https://github.com/E...ugin-CacheFlush . There is autorun too.


Kdo nic nedělá, nic nezkazí!


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users