# Is there anyway to make an app inactive during some hours of the day?

**URL:** <https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956>\
**Category:** Ask for Help\
**Created:** [April 27, 2020, 4:02pm UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956 "2020-04-27T16:02:22Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcel\_Bulk](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/marcel_bulk/32/5443_2.png) [@Marcel\_Bulk](https://community.glideapps.com/u/Marcel_Bulk)\
**Post date:** [April 27, 2020, 4:02pm UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/1 "2020-04-27T16:02:22Z")

</div>

Hi, I have made a home delivery app for a small local pizzeria. Now I am wondering if there is anyway that I can only make the app functioning only during the opening hours of the pizzeria. If someone places an order at 2.00 am that order won’t be picked up and dealt with, and it would “contaminate” the Sheet and the app with unnecessary orders. Thanks in advance for any ideas!

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 27, 2020, 4:14pm UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/2 "2020-04-27T16:14:55Z")

</div>

It would need to be a pro app to have background app refresh, but you could place a Now() formula in the sheet somewhere to grab current time. Create a formula that checks if it’s between a certain time range and output true or false. Use this boolean value to show/hide the order button.

Example:

 ![Screen Shot 2020-04-27 at 12.14.44 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/e/e89992f6fd7447c70bf02b5367242d0ecb52a661.png)

---

<div class="post-metadata">

**Author:** ![Marcel\_Bulk](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/marcel_bulk/32/5443_2.png) [@Marcel\_Bulk](https://community.glideapps.com/u/Marcel_Bulk)\
**Post date:** [April 27, 2020, 4:16pm UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/3 "2020-04-27T16:16:37Z")

</div>

Thanks Robert! Will give that a try.

---

<div class="post-metadata">

**Author:** ![Marcel\_Bulk](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/marcel_bulk/32/5443_2.png) [@Marcel\_Bulk](https://community.glideapps.com/u/Marcel_Bulk)\
**Post date:** [May 1, 2020, 7:08am UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/4 "2020-05-01T07:08:34Z")

</div>

I tried implementing the suggested formula to check if an order is placed within a certain timeframe. It works fine in the cell were I placed the formula, but it should automatically do this for all new cells that are generated in this column and that does not work. I tried using the arrayformula function, but I think I made a mistake somewhere. Anybody have a tip for me how to get this working? Here is a screenprint of the current formula:

 ![array](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/3/3b72b7275c4c1b2d093279d1a02aca3d6d43ba01.jpeg)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 2, 2020, 12:44am UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/5 "2020-05-02T00:44:01Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/9/9ee68d2071750b4d75eadb8e26aad5c44ce9e8ac.png)

Assuming column A stores the hour of ordering so that you won’t have to get HOUR involved in the nested formula, I got it work with the formula in the image.

=ARRAYFORMULA(IF(A2:A\<\>"",IF(A2:A\<9,FALSE,IF(A2:A\>=20,FALSE,TRUE)),""))

Update: I random some timestamps, got an arrayformula for the hour column.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/f/fdd35f2b4d7d36a148650d88950ab60cede513de.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [May 2, 2020, 2:07am UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/6 "2020-05-02T02:07:57Z")

</div>

Just a thought, but if you can build the current date and opening time in one column, and the current date and closing time in another column as true datetimes, then I would think you could build visibility around buy button within Glide to only show it if the opening datetime is on or after now and the closing datetime is on or before now. This way you would only have to worry about the datetime in the sheet updating once a day and Glide would handle the datetime comparison.

---

<div class="post-metadata">

**Author:** ![Marcel\_Bulk](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/marcel_bulk/32/5443_2.png) [@Marcel\_Bulk](https://community.glideapps.com/u/Marcel_Bulk)\
**Post date:** [May 2, 2020, 10:42am UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/7 "2020-05-02T10:42:21Z")

</div>

Thanks for this suggestion, I will try to set it up like that.

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [May 31, 2020, 8:04pm UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/8 "2020-05-31T20:04:14Z")

</div>

Hi @Jeff_Hager

I followed your recommendation to use Now() within Data Editor and everything was fine until the deadline is reached … Glide doesn’t fire the Now() event so, the condition is not evaluated.

Here my screenshots can give an idea:

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/6/60edf1f39297e40a8f9cdc1a9c166c54f1704d5b.png) ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/4/412504acc2dc4f36fd7af0f2d49346592bd0cede.png)

and it’s how the logic was configured:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/5/5c0d1ac1de581dd9e98883541ab77f8a23635708.png)

and when the time is reached, nothing changes  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/e/ea0c481b38b44293bf167d384b823cdab6f59424.png)

Is it a bug or I’m doing anything wrong? If I modify the _OpenTime_ value manually, the logic works fine but in an automatic mode, nothing happens!

May you test it and tell me if I’m crazy or not?? 😅

Gracias y feliz domingo!

---

<div class="post-metadata">

**Author:** ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)\
**Post date:** [May 31, 2020, 8:06pm UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/9 "2020-05-31T20:06:40Z")

</div>

Working on pro app? The free tier doesn’t update automatically - only the pro does

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [May 31, 2020, 8:08pm UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/10 "2020-05-31T20:08:19Z")

</div>

I supposed it and tested it with my Pro App and the result was the same!

Gracias @Krivo

---

<div class="post-metadata">

**Author:** ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)\
**Post date:** [May 31, 2020, 8:12pm UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/11 "2020-05-31T20:12:05Z")

</div>

@gvalero have you tried with closed sheet as described here?

[Glideapp Update frequency](https://community.glideapps.com/t/glideapp-update-frequency/9372/14)

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [May 31, 2020, 8:34pm UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/12 "2020-05-31T20:34:38Z")

</div>

no way @Krivo, nothing happens 😠

---

<div class="post-metadata">

**Author:** ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)\
**Post date:** [May 31, 2020, 8:37pm UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/13 "2020-05-31T20:37:06Z")

</div>

@gvalero pls reinstall your computer - and afterwards if that doesn’t work pls reinstall the internet 🤪

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [May 31, 2020, 8:44pm UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/14 "2020-05-31T20:44:08Z")

</div>

🤣 my plan C will be to buy a new phone as well!

I will have to wait for @Jeff_Hager or @Mark to continue my work. Thanks anyway

Saludos

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [May 31, 2020, 8:57pm UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/15 "2020-05-31T20:57:19Z")

</div>

That made me crack up, good one @Krivo 😂

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [June 2, 2020, 11:46am UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/16 "2020-06-02T11:46:24Z")

</div>

now everything is working!!

Thanks

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 2, 2020, 11:59am UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/17 "2020-06-02T11:59:51Z")

</div>

Glad you don’t have to reinstall your internet 😂

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [June 9, 2020, 8:01pm UTC](https://community.glideapps.com/t/is-there-anyway-to-make-an-app-inactive-during-some-hours-of-the-day/7956/18 "2020-06-09T20:01:04Z")

</div>

🤣
