> For the complete documentation index, see [llms.txt](https://docs.keyfax.biz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keyfax.biz/product-suite/admin/databox-examples/working-hours.md).

# 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;
