May-28-2019, 09:31 PM
(May-28-2019, 08:42 PM)Gribouillis Wrote: Your description makes it very difficult to understand the issue. If you don't have an error message to post, could you post expected output vs actual output?
The message content should contain the current temp and the current date and time the message was sent. But the content of the message is repeating from the moment of first execution. Same "temp" & "time". over and over. The values are not being updated.
the currenttemp was set to a hard value in the example code for the purposes of this post. In my actual code, the temp is read from a device file and that's not getting updated either. (I couldn't figure out how to show that in the post.
The scheduled job is not "polling" the current "variable values" to insert into the content of the message. IE temp & time. this can be seen in my example code. the message will cycle, but the date and time don't change.
If I have the scheduled event set to take place every 1 min. the timestamp within the message should be 1 min apart from the previous message. It is not. It's like the "schedule module" took a snapshot of the message then re-issues it at whatever time-marker I set.
As simply as I can put it "the variables contained within the message and not getting updated prior to the execution of the scheduled event".. which is "send message"
if someone could show me the proper way to get the "current" datetime in the message prior to its scheduled excecution (IE:send message), I think I can figure out the temperature. atleast I hope.