Found this example the forum but the task never runs. I'm using this expresion and testing if Equal to the 'System Time.Time Without Minutes' property.
SUNSET_DATE_AND_TIME - Days=0, Hours=00, Minutes=30, Seconds=00
This evaluates to something that looks like this:
If ('System Time.Time Without Seconds' is Equal '2/21/2010 5:04:00 pm') Then
do stuff...
It has been in place for a couple of days now but does not run.
Suggestions? Jay
Task 30 minutes before sunset doesn't run
Re: Task 30 minutes before sunset doesn't run
Use it like this:
You need to have both the time and date present for it to evaluate. Hence, System Time.TimeWithoutSeconds won't get you what you want.
Osler
Code: Select all
If System Time.TimeAndDate is equal '<the expression defined by SUNSET_DATE_AND_TIME - Days=0, Hours=00, Minutes=30, Seconds=00>' Then
Osler
Re: Task 30 minutes before sunset doesn't run
Thanks, its working now.
The original post where I saw this mentioned that using a condition with seconds causes a lot of overhead checking. Do I need to be concerned? The machine I'm using is not very strong. Single processor AMD @ 995Mhz.
The original post where I saw this mentioned that using a condition with seconds causes a lot of overhead checking. Do I need to be concerned? The machine I'm using is not very strong. Single processor AMD @ 995Mhz.
Re: Task 30 minutes before sunset doesn't run
It'll be fine. After being used to nested if/then functions, you will find that the very simple logic in tasks to sometimes stump you as to why it isn't working or why it is working the way that it is.
Osler
Osler
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Re: Task 30 minutes before sunset doesn't run
I got about 50 scripts always running using a Do Loop.
The Loop checks the state of a property every milisecond.
So imagine i have about 50 state checks (GetpropertyValue) every ms and it doesn't cost a single cpu percentage.
So no worries about a 1 second check
The Loop checks the state of a property every milisecond.
So imagine i have about 50 state checks (GetpropertyValue) every ms and it doesn't cost a single cpu percentage.
So no worries about a 1 second check