Page 4 of 5
Re: Timer
Posted: Mon Feb 22, 2010 3:32 am
by BigBlack
Ok now i've understand how to set it in the autostart! Now i need only to know how to use it in the windows scheduler. Thank you
Re: Timer
Posted: Mon Feb 22, 2010 8:54 am
by miljbee
with the windows scheduler you don't need the timer plugin. Just create a scheduled task in windows, and launch eventghost.exe -e yourevent.
This will generate a Main.youevent in eg each time it runs.
Re: Timer
Posted: Mon Feb 22, 2010 2:04 pm
by BigBlack
good... so if my event it's Timer.Sveglia i need to change it with Main.Sveglia to make it work with windows scheduler right?
Re: Timer
Posted: Mon Feb 22, 2010 3:43 pm
by Bartman
Yep.
For long time actions I would recommend the windows task scheduler.
The timer plugin is targeted for short time usage and timers which are frequently restarted, stopper or changed in other way. Putting the computer into standby after xx minutes after last remote command and reminding me of food in the oven was the reason I started the timer plug in.
Re: Timer
Posted: Tue Feb 23, 2010 3:13 am
by BigBlack
Ok now i'll try what's better for me

EG has rapid access instead of windwos scheduler so to reimpost every day a different time for wake up it's faster. Thank you for ur help! Bye bye
Re: Timer
Posted: Wed May 12, 2010 8:13 pm
by sdmmas
Hi:
Im have a Python Program and i want execute this program every 30 min. ┬┐How i can do this?
Thanks and Regards
Re: Timer
Posted: Tue Dec 31, 2013 4:11 pm
by claymic
Hi guys.
How to know if a timer is running or not ?
Thanks
Clayton
Re: Timer
Posted: Tue Dec 31, 2013 4:27 pm
by krambriw
Double click on the plugin itself and check what is presented in the listbox. If you see it there, it is running...
Re: Timer
Posted: Tue Dec 31, 2013 4:31 pm
by claymic
Thanks, i don┬┤t explain right.
I want to know if is possible with python to know if a timer is running or not.
Clayton
Re: Timer
Posted: Wed Jan 01, 2014 8:41 am
by krambriw
Now we are talking...
Yes, we are lucky, the plugin developer Bartman wrote the plugin in such a way that we actually can reach that data from *outside*.
Assume you configure a timer with the name 'timer test'. When the timer is running, it will be visible in the list of the plugin as mentioned earlier.
While it is running, run the following python script:
Code: Select all
if eg.plugins.Timer.plugin.timerObjects.has_key('timer test'):
t = eg.plugins.Timer.plugin.timerObjects['timer test']
if t.IsActive():
print 'running'
Re: Timer
Posted: Sat Mar 15, 2014 11:43 pm
by Fumes
I know the question was brought up earlier in this thread but i can't seem to find a proper answer.
Is there a way to pass along payloads with the triggered event?
Best regards / Bjarne Lindqvist
Re: Timer
Posted: Sun Mar 16, 2014 5:43 am
by krambriw
The Timer plugin is rather old and does not support payloads in events. But it is rock solid for normal scheduling.
The SchedulGhost plugin is much more advanced and supports payload in the event....
Re: Timer
Posted: Wed May 14, 2014 10:41 am
by piert
My long time trustful Timer command to stop my squeezebox after a certain time after switching it on has stopped working all of a sudden.
I have been using the Timer plugin and the below command in a Python script for a long time (many many months) and it has worked reliably until now:
Code: Select all
eg.plugins.Timer.TimerAction(u'squeezeboxtimer', 0, 1, 3600, u'test', False, False, 1, u'00:00:00')
The number 3600 in above command means that the event 'Timer.test' will be issued 3600 seconds after the start of the python script.
(I have studied the way the command works quite a long time ago, so I don't exactly remember what the other values stand for)
Does anybody have similar experiences or tips how to get this sleep timer running again. If better approaches are available to use a sleep timer in Eventghost, I am also all ears
Thanks, regards,
Perry
Re: Timer
Posted: Thu May 15, 2014 5:39 am
by krambriw
Perry,
I have not seen the problem myself (currently I'm not using the timer plugin) but you should instead consider to use Pako's SchedulGhost.
1) Add the plugin
2) Accept or reject to add the proposed configuration tree (you could reject)
3) Create one simple egg clock action as the sample below
You can then trigger the action from 'whatever'
Also from a script, you could trigger it very simple using this code as example
Code: Select all
eg.plugins.SchedulGhost.StartEggTimer((u'01:00:00', u'SchedulGhost', u'Squeezebox OFF', u'', u'', (191, 191, 255), (64, 0, 128), u'0;-56;0;0;0;400;0;0;0;0;0;0;0;0;MS Shell Dlg 2', (10, 10)))
(Use 'Copy As Python' to copy your action, then paste in a script to get your correct syntax)
When you trigger the action, similar to this will happen (in this case I changed the egg clock to a 5 second variant):
Code: Select all
07:32:28 SchedulGhost: Start egg timer: SchedulGhost.Squeezebox OFF:
07:32:33 SchedulGhost.Squeezebox OFF
You can then use the event 'Squeezebox OFF' to actually turn off your squeezebox(es)
Best regards, Walter
Re: Timer
Posted: Thu May 15, 2014 7:24 am
by piert
Walter,
I had not realized that Scheduleghost had an egg-timer function included: great solution!
The pictures make the answer very informative indeed.
As usual, thank you for your great help!
Best regards,
Perry