# Working Hours

Here's a very simple way to determine if you are running a script within operating hours:

<figure><img src="/files/7OsTXxgs6ZuJ7WlVvCBu" alt=""><figcaption><p>SQL databox to check if OOH</p></figcaption></figure>

The way this works is to find if today is a holiday (the database table is `syHolidays`) and the WHERE clause LOOKS FOR an entry for today, in **EN**gland (other standard values supplied are **NI** and **SCO**).  &#x20;

It also checks for weekend (Saturday=7 and Sunday=1) and finally if the time is in working hours. It adds all three resultant boolean values and the Expression will be True if the value returned is greater than zero, meaning we are operating outside of normal hours.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keyfax.biz/product-suite/admin/databox-examples/working-hours.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
