https://retellai.com/?utm_source=discord&utm_medium=seo logo
Is it possible to have an agent only run during ce...
# ❓・ai-evy-support
k
@AI Evy Is it possible to have an agent only run during certain days / hours? For example Monday - Saturday 20:00 - 08:00?
a
Thanks for tagging me @kingkeezo. I'll look through relevant sources and get back to you shortly.
### Answer --- Yes, you can control when your agent operates during specific days and hours using Conversation Flow logic. Based on the available approaches: For Conversation Flow Agents: You can implement time-based logic using function nodes after the start node [(1) ]() . The approach involves: 1. Adding a function node that checks if the current time falls within your desired operating hours (Monday-Saturday 20:00-08:00) 2. Creating two transitions: one for calls within the time frame and another for calls outside the time frame 3. If the call is outside operating hours, directing to a conversation node that informs the caller "We're unable to pick your call right now" and then ends the call 4. If the call is within operating hours, continuing with your existing flow Time-Based Prompt Approach: You can also use dynamic variables with prompts that check the
{{current_time}}
and include logic like: - Check the current time - If the time is within your operating hours, proceed normally - If outside operating hours, inform the user that the service is only available during specific hours [(2) ]() However, one community member noted that relying solely on prompts for time-based restrictions may not be ideal for rule-based functionality, as prompts can potentially be overridden . The function node approach in Conversation Flow provides more reliable control over when your agent accepts and handles calls [(1) ]() .
​ To learn more, see the sources I considered: [[1] RTB](https://discord.com/channels/1186424376300679209/1420050512434429960) [[2] How can I make it not transfer during certain hours?](https://discord.com/channels/1186424376300679209/1359465662803611839) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
k
Tell me more about the first option