Hi All,
What is the best (standard) way to call a function periodically in a plugin?
One way I’m thinking is to do something like
[i]function poll_module()
do_work()
_G.poll_module = poll_module
luup.call_timer(“poll_module”, 5, “”, “”, “”)
end[/i]
I appreciate your inputs
You should be able to just call the function name in the luup.call_timer() function. There should be no need to add it to the global space.
[quote=“garrettwp, post:2, topic:178576”]You should be able to just call the function name in the luup.call_timer() function. There should be no need to add it to the global space.
- Garrett[/quote]
Sure. I will check it.
But the code in my earlier post doesn’t seem to work. I’m not sure why. I will double check.
Is there any other way to perform periodic calls?
Thanks
luup.call_timer and luup.call_delay are the preferred methods of calling a delayed function with in your plugin.