Announcement

Collapse
No announcement yet.

1 VB script gets triggered twice in quick succession, sometimes only 1 gets executed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • zwolfpack
    replied
    Originally posted by mrceolla View Post

    Interesting. Did you run into this recently or was this some time ago?
    It's been awhile. Looking at files dates, maybe about a year ago.

    Leave a comment:


  • mrceolla
    replied
    Originally posted by zwolfpack View Post
    I ran across this some time ago. I tried to move a bunch of immediate scripts to a common script that could be called with parameters. However, found that if the script was called twice from the same event (with different parameters of course), only one of them would run. "Only allow a single instance to run at a time" had no effect. So I reverted back to the immediate scripts.
    Interesting. Did you run into this recently or was this some time ago?

    Leave a comment:


  • mrceolla
    replied
    Originally posted by rprade View Post
    Do you have "Only allow a single instance to run at a time" selected in the event?

    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	14.3 KB
ID:	1241274
    I should've mentioned that in my first post. No, I do not have that option checked. Typically with that option checked there would be a warning in the log that a script run was skipped.

    Leave a comment:


  • zwolfpack
    replied
    I ran across this some time ago. I tried to move a bunch of immediate scripts to a common script that could be called with parameters. However, found that if the script was called twice from the same event (with different parameters of course), only one of them would run. "Only allow a single instance to run at a time" had no effect. So I reverted back to the immediate scripts.

    Leave a comment:


  • rprade
    replied
    Do you have "Only allow a single instance to run at a time" selected in the event?

    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	14.3 KB
ID:	1241274

    Leave a comment:


  • 1 VB script gets triggered twice in quick succession, sometimes only 1 gets executed

    Hi,

    I created a script for sending emails and notifications. This script gets called a number of times in quick succession on a few occasions that happen daily. Example: The last person leaves the house, HS sends 2 notifications: "so-and-so is Away", and "Alarm is Armed". These get sent back to back from two different events. I usually get both notifications but sometimes I only get one.

    I can always see 2 "Running script in background" log entries, but when one of them fails, not even the hs.WriteLog entries appear which are at the beginning of the script, which I put there recently to troubleshoot this problem.

    I'm passing in different Parameters into each call so it is easy to tell which one fails. It isn't always from the same event.

    I recently added a hs.PluginFunction call to this script so I could send Pushover notifications via the Pushover plugin, but again, when one of them fails, it doesn't even get to this point in the script, so I'm not sure how this could be related.

    Any ideas what could be preventing both instances of this script from executing reliably?

    Thanks for any help!
Working...
X