Automatically reloading a plugin on a schedule

Posted on
Wed Oct 11, 2017 12:08 am
zini offline
Posts: 58
Joined: May 19, 2013

Automatically reloading a plugin on a schedule

Forgive me if this is already answered somewhere but I couldn’t find it.

Is there a way to automatically reload a plugin on a certain schedule? For example, reload X plugin every morning at 3am.

Thanks!

Mark

Posted on
Wed Oct 11, 2017 12:27 am
autolog offline
Posts: 2960
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT+1]

Re: Automatically reloading a plugin on a schedule

Take a look at this post: Reload, enable, disable plugin via trigger action / script?

Set-up an Action Group as shown in the above post and then define a schedule to execute it. :)

Posted on
Thu Oct 12, 2017 9:14 am
zini offline
Posts: 58
Joined: May 19, 2013

Re: Automatically reloading a plugin on a schedule

Jon,

Thank you. Sorry I missed that topic. :D

Mark

Posted on
Tue Oct 24, 2017 10:48 am
zini offline
Posts: 58
Joined: May 19, 2013

Re: Automatically reloading a plugin on a schedule

Okay, so I understand the script now and how I would automatically reload a plugin. With that being said, I don't quite understand how to find the specific file path to correctly point to the plugin to make it reload.

My goal is currently to automatically reload the Better Email plugin since it seems that gmail will time out the IDLE. Would anyone happen to know what the script would look like to be able to do this?

Thanks.

Mark

Posted on
Tue Oct 24, 2017 11:19 am
jay (support) offline
Site Admin
User avatar
Posts: 15693
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Automatically reloading a plugin on a schedule

If the plugin's ID isn't specified in it's docs (it should be just for this situation but sometimes isn't) then you can open the plugin by finding it in a Finder window, right-clicking it and select Show Package Contents. This will open the plugin bundle - select the Contents folder and then select the Info.plist file. You should see the contents in the quick-look pane, what you're looking for is the value under CFBundleIdentifier.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Oct 24, 2017 12:49 pm
FlyingDiver offline
Posts: 3469
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Automatically reloading a plugin on a schedule

Code: Select all
plugin = indigo.server.getPlugin("com.flyingdiver.indigoplugin.betteremail")
if plugin.isEnabled():
   plugin.restart()

But I think you'd get the same results by using the standard Indigo actions to disable and re-enable just the GMail IMAP device instead of restarting the entire plugin.

Or disable IDLE and go back to polling.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests

cron