A greeting bot for a colleague from work I have a colleague at work that works from home every Tuesday and Thursday. At around 8:00 AM he sends us a message with the following text:


  Hello today I'm working from home


In order to relieve him from the burden of doing this every day he stays at home, we would like to automate this task for him.

The challenge

Write in as few bytes as possible a piece of code that:


Receives the current time: your code may receive values for the current year, month (1-12), day of month (1-31), hour (0-23) and minute (0-59) and the day of the week (you can choose whether this number starts from 0 or 1, and if 0/1 means Sunday, Monday or any other day); alternatively you may receive a structure such as Date, DateTime, Calendar or any other time-related structure, if your language allows it. You can also receive a string with the date in yyyyMMddHHmm if you want, or two separate strings for date and time, and then an integer with the day of week. Feel free.
Returns two consistent truthy and falsey values, indicating if the message must be sent to the work chat or not.


Rules


This piece of code is assumed to be invoked periodically. The exact periodicity is irrelevant, nonetheless.
The truthy value must be returned if the day of week is Tuesday or Thursday and the time is 8:00 AM with an error margin of 10 minutes (from 7:50 to 8:10 inclusive).
The truthy value must be sent only if it is the first time the code is invoked between those hours for the specified day. We don't want the bot to send the same message several times in a row. The way you manage this restriction will be entirely up to you.
Your code may be an independent program executed repeatedly or it may be part of a bigger code that is always running. Your choice.
You may assume that there will be no reboots between executions of the code.
You may assume that the date will always be correct.
Explanations about your code and specifically about the method used to achieve persistence are encouraged.


Examples

(Week starts on Monday: 1, the following invokations will be made in succession)
2018,08,27,08,00,1 = falsey (not Tuesday or Thursday)
2018,08,28,07,45,2 = falsey (out of hours)
2018,08,28,07,55,2 = truthy (first time invoked this day at the proper hours)
2018,08,28,08,05,2 = falsey (second time invoked this day at the proper hours)
2018,08,28,08,15,2 = falsey (out of hours)
2018,08,29,08,00,3 = falsey (not Tuesday or Thursday)
2018,08,29,18,00,3 = falsey (not Tuesday or Thursday)
2018,08,30,07,49,4 = falsey (out of hours)
2018,08,30,07,50,4 = truthy (first time invoked this day at the proper hours)
2018,08,30,07,50,4 = falsey (second time invoked this day at the proper hours)
2018,08,30,08,10,4 = falsey (third time invoked this day at the proper hours)
2018,08,30,08,11,4 = falsey (out of hours)
2018,09,04,08,10,2 = truthy (first time invoked this day at the proper hours)


This is code-golf, so may the shortest code for each language win!
JavaScript (ES6), 43 bytes

f=(D,t,d)=&gt;5&gt;&gt;d&amp;t&gt;749&amp;t&lt;811&amp;&amp;!f[D]*(f[D]=1)

Try it online!
Input

the date as a string in yyyymmdd format
the time as a string in hhmm format
the day of week as a 0-indexed integer, with 0 = Tuesday, 1 = Wednesday, ..., 6 = Monday

Output
Returns 0 or 1.
Commented
f = (            // named function, as the underlying object will be used as storage
  D,             // D = date (string)
  t,             // t = time (string)
  d              // d = day of week (integer)
) =&gt;             //
  5              // 5 is 0000101 in binary, where 1's are set for Tuesday and Thursday
  &gt;&gt; d &amp;         // test the relevant bit for the requested day of week
  t &gt; 749 &amp;      // test whether we are in the correct time slot
  t &lt; 811        //
  &amp;&amp; !f[D] *     // make sure that this date was not already invoked at a correct time
  (f[D] = 1)     // and store it in the underlying object of f()