---
title: How to stop time-based alerts from triggering outside of shift hours?
description: Add a conditional expression to a job trigger so a repeating form stops firing once the crew has logged out, even when the job has been left open overnight.
---

[Skip to content](https://support.ofsystems.com/how-to-stop-time-based-triggers-from-triggering-outside-of-shift-hours#main-content)

![OFS\_Circle.png\]](https://support.ofsystems.com/hs-fs/hubfs/OFS_Circle.png?height=45&name=OFS_Circle.png)

- [OFS Customer Portal](https://support.ofsystems.com/)
- [Main Website](https://ofsystems.com/)
- [Contact Us](https://www.ofsystems.com/contact-us?)
- [Service Portal](https://ofsystems.atlassian.net/servicedesk/customer/portal/1)

Open main navigation

Close main navigation

- [OFS Customer Portal](https://support.ofsystems.com/)
- [Main Website](https://ofsystems.com/)
- [Contact Us](https://www.ofsystems.com/contact-us?)
- [Service Portal](https://ofsystems.atlassian.net/servicedesk/customer/portal/1)

 Welcome to the OFS Customer Portal

- There are no suggestions because the search field is empty.

1. [OFS Customer Portal](https://support.ofsystems.com/?hsLang=en)
2. [How To Questions](https://support.ofsystems.com/how-to-questions?hsLang=en)
3. [Flow - Conditional Expression & Triggers](https://support.ofsystems.com/how-to-questions?hsLang=en#flow-conditional-expression-triggers)

# How to stop time-based alerts from triggering outside of shift hours?

## Add a conditional expression to a job trigger so a repeating form stops firing once the crew has logged out, even when the job has been left open overnight.

#### **The problem this solves**

A half-hourly check is set to trigger against the job. At the end of the day the operators log out of their shift but leave the job open, because they will pick it up again in the morning. The job trigger keeps counting through the night, so the form keeps firing at an empty line until someone ends the job.

Adding a condition to the trigger stops that, by checking whether a shift is running before the form is raised.

#### **Step 1 — Open the trigger**

Go to the **Alerts** tab, select the alert, and click the **Triggers** tab. Double-click the trigger row to open it.

![](https://support.ofsystems.com/hs-fs/hubfs/image-png-Jul-21-2023-04-03-06-9197-AM.png?width=670&height=359&name=image-png-Jul-21-2023-04-03-06-9197-AM.png)

#### **Step 2 — Turn on the conditional expression**

Within the **Job** tab, click the **Conditional Expression** tab and toggle on **Enable Conditional Expression**.

![](https://support.ofsystems.com/hs-fs/hubfs/conditionalexpressionNull-gif.gif?width=670&height=358&name=conditionalexpressionNull-gif.gif)

 

#### **Step 3 — Type the condition**

Type the following into the expression box:

```
shift != null
```

This condition has to be typed. It is not available from the drop-down menus in the expression builder — those offer Value, Product Data, Shift Data and Job Data, and the maths operators. Typing works for anything the expression engine accepts.

![](https://lh3.googleusercontent.com/HE1P7OC19GFIcl6W93Vmvd1v9T77PyZiohlZl_23Q5vV_sn3p-dx3IIVraZVBz4943gFyoVNUPDEgF7B5yT_gBnmYBV-nh6G6xndgoevioqad5aTYD5bfhGJTpglgKd5AfrfLdO1ozUbaSubx2MUTwc)

#### **Step 4 — Save**

Click **Update**, then **Save** on the page. The dialog's own button stages the change; the page-level **Save** commits it.

![](https://support.ofsystems.com/hubfs/image-png-Jul-21-2023-05-43-53-8618-AM.png)

---

#### **Test it**

Check both halves, so you know the condition is suppressing rather than switching the alert off altogether.

1. With a shift logged in and a job running, confirm the form still fires on schedule.
2. Log the shift out and leave the job open.
3. Wait for the next scheduled trigger and confirm no form is raised.
4. Log a shift back in and confirm the form starts firing again.

#### **Adapting it to your own line**

- The same condition works on any job-based repeating trigger, not only half-hourly checks.
- Ending the job at the end of the shift also solves the problem and needs no configuration. If your crews can reliably do that, it is the simpler fix.
- If you want the form to stop outside specific hours rather than outside any shift, use the trigger's **Schedule** controls instead of a condition. Bear in mind a service can carry its own schedule too, so an alert can fire on time and still deliver nothing.

- [Getting Started](https://support.ofsystems.com/getting-started?hsLang=en#main-content)

    - [Console: The Basics](https://support.ofsystems.com/getting-started?hsLang=en#console-the-basics)
    - [Analytics: The Basics](https://support.ofsystems.com/getting-started?hsLang=en#analytics-the-basics)
    - [Fusion Manager: The Basics](https://support.ofsystems.com/getting-started?hsLang=en#fusion-manager-the-basics)
    - [OFS-Flow Training : The Basics](https://support.ofsystems.com/getting-started?hsLang=en#ofs-flow-training-the-basics)
    - [OFS-Go](https://support.ofsystems.com/getting-started?hsLang=en#ofs-go)
    - [MayvnAI](https://support.ofsystems.com/getting-started?hsLang=en#mayvnai)
- [Help & Support](https://support.ofsystems.com/help-support?hsLang=en#main-content)

    - [Troubleshooting](https://support.ofsystems.com/help-support?hsLang=en#troubleshooting)
    - [OFS in a Box](https://support.ofsystems.com/help-support?hsLang=en#ofs-in-a-box)
    - [Routers](https://support.ofsystems.com/help-support?hsLang=en#routers)
    - [PLCs](https://support.ofsystems.com/help-support?hsLang=en#plcs)
- [Success with MayvnAI](https://support.ofsystems.com/success-with-mayvnai?hsLang=en)
- [Training Videos](https://support.ofsystems.com/training-videos?hsLang=en#main-content)

    - [Operator Console](https://support.ofsystems.com/training-videos?hsLang=en#operator-console)
    - [OFS Analytics](https://support.ofsystems.com/training-videos?hsLang=en#ofs-analytics)
    - [Fusion-Manager](https://support.ofsystems.com/training-videos?hsLang=en#fusion-manager)
    - [OFS-Flow](https://support.ofsystems.com/training-videos?hsLang=en#ofs-flow)
    - [OFS-Go](https://support.ofsystems.com/training-videos?hsLang=en#ofs-go)
- [How To Questions](https://support.ofsystems.com/how-to-questions?hsLang=en#main-content)

    - [Administration](https://support.ofsystems.com/how-to-questions?hsLang=en#administration)
    - [Operator Console](https://support.ofsystems.com/how-to-questions?hsLang=en#operator-console)
    - [Analytics](https://support.ofsystems.com/how-to-questions?hsLang=en#analytics)
    - [Fusion Manager](https://support.ofsystems.com/how-to-questions?hsLang=en#fusion-manager)
    - [Fusion Manager - Alerts & Services](https://support.ofsystems.com/how-to-questions?hsLang=en#fusion-manager-alerts-services)
    - [Flow](https://support.ofsystems.com/how-to-questions?hsLang=en#flow)
    - [Flow - Validations](https://support.ofsystems.com/how-to-questions?hsLang=en#flow-validations)
    - [Flow - Conditional Expression & Triggers](https://support.ofsystems.com/how-to-questions?hsLang=en#flow-conditional-expression-triggers)
    - [APIs](https://support.ofsystems.com/how-to-questions?hsLang=en#apis)
- [FAQs](https://support.ofsystems.com/faqs?hsLang=en#main-content)

    - [Operator Console](https://support.ofsystems.com/faqs?hsLang=en#operator-console)
    - [Fusion Manager](https://support.ofsystems.com/faqs?hsLang=en#fusion-manager)
    - [Analytics](https://support.ofsystems.com/faqs?hsLang=en#analytics)
    - [OFS-Flow](https://support.ofsystems.com/faqs?hsLang=en#ofs-flow)
- [Case Studies](https://support.ofsystems.com/case-studies?hsLang=en#main-content)

    - [Mavyn AI](https://support.ofsystems.com/case-studies?hsLang=en#mavyn-ai)
- [OFS Guides](https://support.ofsystems.com/ofs-guides?hsLang=en)
- [Webinars](https://support.ofsystems.com/webinars?hsLang=en)

[![](https://support.ofsystems.com/hs-fs/hubfs/Logo%20Medium_no%20words.png?width=128&height=68&name=Logo%20Medium_no%20words.png)](http://ofsystems.com)

Operations Feedback Pty Ltd

7/627 Chapel St, South Yarra, VIC 3123  
+61 3 8684 9859

<https://www.ofsystems.com/> <https://www.linkedin.com/company/operations-feedback-systems/> [mailto:support@ofsystems.com](mailto:support@ofsystems.com)

Copyright © 2025, Operations Feedback Systems Pty Ltd.