You can create a condition for exiting at a specific time like every day at 2:30 PM but not a specific period of time after entry. But I have noted this requirement.
Candle Time function is used to create condition on the basis of time
For example if you want to set a condition for running a strategy only on thrusday, you can write candle time(dayofweek) equal to 4. Monday is 1, tuesday is 2 and so on.
If you want to exit on the basis of certain information being true at a specific time, you can add that as well. Suppose, you want to exit at 3:15, you can do that as well.