Problem with Date Conditional Schedule Actions Firing

Posted on
Fri Nov 01, 2019 5:40 pm
sumocomputers offline
Posts: 267
Joined: Jun 23, 2008

Problem with Date Conditional Schedule Actions Firing

Problem with Date Conditional Schedule Actions Firing

I have some schedules that change variables at different times of the year. They are for my utility rates and have attached screenshots.

Schedule 1 (Summer) has a condition for "if current date is between June 1 & Oct 31"

Schedule 2 (Winter) has a condition for "if current date is between Nov 1 & May 31"

But looking through the log files:

Oct 30th: All schedule actions for Schedule 1 fired
Oct 31st: No schedule actions fired for Schedule 1 or 2
Nov 1st: No schedule actions fired for Schedule 1 or 2

Maybe I am misunderstanding how the date condition works, but sure could use some help tracking this down.
Attachments
Screen Shot 2019-11-01 at 8.57.17 AM.png
Winter-03
Screen Shot 2019-11-01 at 8.57.17 AM.png (124.39 KiB) Viewed 1404 times
Screen Shot 2019-11-01 at 8.57.15 AM.png
Winter-02
Screen Shot 2019-11-01 at 8.57.15 AM.png (143.59 KiB) Viewed 1404 times
Screen Shot 2019-11-01 at 8.57.12 AM.png
Winter-01
Screen Shot 2019-11-01 at 8.57.12 AM.png (174.03 KiB) Viewed 1404 times
Screen Shot 2019-11-01 at 8.57.00 AM.png
Summer-03
Screen Shot 2019-11-01 at 8.57.00 AM.png (149.68 KiB) Viewed 1404 times
Screen Shot 2019-11-01 at 8.56.55 AM.png
Summer-02
Screen Shot 2019-11-01 at 8.56.55 AM.png (148.15 KiB) Viewed 1404 times
Screen Shot 2019-11-01 at 8.56.52 AM.png
Summer-01
Screen Shot 2019-11-01 at 8.56.52 AM.png (153.78 KiB) Viewed 1404 times

Posted on
Sat Nov 02, 2019 1:17 am
Sevilsivle offline
Posts: 122
Joined: Jan 11, 2013

Re: Problem with Date Conditional Schedule Actions Firing

My first thought is that „between“ does not include the first and last date. So between 1st Nov and 31st May runs from 2nd Nov to 30 May.

Tim

Posted on
Sat Nov 02, 2019 7:07 am
sumocomputers offline
Posts: 267
Joined: Jun 23, 2008

Re: Problem with Date Conditional Schedule Actions Firing

Sevilsivle wrote:
My first thought is that „between“ does not include the first and last date. So between 1st Nov and 31st May runs from 2nd Nov to 30 May.

Tim


I never considered that, but it makes sense now that you say it.

I am going to make some dummy schedules and test that theory over the next few days.

Thanks

Posted on
Sat Nov 02, 2019 7:32 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Problem with Date Conditional Schedule Actions Firing

The documentation for Conditions - Conditions - gives an explanation for the time being between 6:00pm and 11:00pm
This condition says that if the current time is greater than 6pm and less than 11:00pm then the actions will be executed.
So this doesn't include 06:00pm and 11:00pm. Which for time probably doesn't matter.

If the same logic is being applied to dates (no documentation explanation given AFAICS) then the start and end dates won't trigger the condition (which is what you are seeing).

It would probably be better if the condition "is between" was re-worded as "is between (exclusive)". Even better would be to add another condition that says "is between (inclusive)". :)

Posted on
Sat Nov 02, 2019 10:15 am
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Problem with Date Conditional Schedule Actions Firing

Sevilsivle wrote:
My first thought is that „between“ does not include the first and last date. So between 1st Nov and 31st May runs from 2nd Nov to 30 May.


This is correct. Think of it this way: on a plane row with 3 seats, the person in the middle seat is "between" the people on each side seat. A child that's sitting in the lap of one of the people on the sides isn't considered "between" the two end seats. ;)

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Nov 05, 2019 1:26 pm
sumocomputers offline
Posts: 267
Joined: Jun 23, 2008

Re: Problem with Date Conditional Schedule Actions Firing

jay (support) wrote:
Sevilsivle wrote:
My first thought is that „between“ does not include the first and last date. So between 1st Nov and 31st May runs from 2nd Nov to 30 May.


This is correct. Think of it this way: on a plane row with 3 seats, the person in the middle seat is "between" the people on each side seat. A child that's sitting in the lap of one of the people on the sides isn't considered "between" the two end seats. ;)


This all makes sense now.

I did try to create another condition for another trigger and wanted the value to be from 0 to 5, but inclusive of 0. I just used 2 conditions:

-between 0 and 6
-equal to 0

Is there a better way to do this? Can you use negative numbers? Like between -1 and 6?

Posted on
Tue Nov 05, 2019 5:38 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Problem with Date Conditional Schedule Actions Firing

sumocomputers wrote:
Can you use negative numbers? Like between -1 and 6?


Yes, you can.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests