Count operating time per day

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Franzel007
Normal user
Posts: 12
Joined: 01 Aug 2021, 16:18

Count operating time per day

#1 Post by Franzel007 » 15 Apr 2022, 17:23

Hihi,
I would like to write a rule in which I count seconds or minutes when a certain value is exceeded and then store this time over one day in a variable.
At the end of a the day I wand send the value of the variable (Operation Time) per email to my adresse (I think this part is not problem for me).

How can I best solve this.

Can you please help me with this.

Greetings Franzel

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Count operating time per day

#2 Post by TD-er » 15 Apr 2022, 17:42

You can get the nr of seconds of the current day. (see the system variables page for all variables and their current value)
By setting a timer for a specific moment something should be ready, you can then store the nr of seconds of the current day in a variable.

So in pseudo code:

Code: Select all

At midnight:
  Check if [int#1] not equal to 0, then:
    let,2,[int#2]-[int#1]
    if [int#2] > 0 then:
       mail about task being overdue
  store 0 in int#1

At moment something had to be done:
  store seconds of current day in int#1

At moment something is done:
  store seconds of current day in int#2
  

Post Reply

Who is online

Users browsing this forum: No registered users and 107 guests