Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

running code 15 minutes after sunset


Jay Ess

Question

I have a qa which updates variables at 1 minute past sunset + x  minutes which is stored as a variable, the variable it gets is the sunset time + x minutes for coming saturday. I store the date in sec of the coming saturday.

 

my problem, is as follows:

say the past sat sunset + x was 17:34 so at 17:35 it will get next weeks sunset and store it, the time for next sat would be approx 13/16 minutes later, so this time it would store 17:47.

now while it check every minute between 17:34 and 17:47 it will fluctuate between the two dates as the first time it runs it is after 17:34 but the second time it runs it is before 17:47.

 

how can by pass this issue with still running the qa every minute?

have thought about setting a variable to control it and then wait for 1 hour to unset the variable but it feels wrong, also was debating making sure that the next week sat is more then this week, as we generally only go forward in time but again am slightly unconfortable with that as in case i or a user tests this with a forward date it will then not set it self back.

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...