I am working on a process model and it needs to stop at a certain time (For example 2PM CST)
However, I don't see any option to do it. I've tried working on the advance options but it seems like that doesn't satisfy it as well.
This was the condition that I put in Advance Options
now() < local(fn!todate(today()), timezoneid()) + 30/24
Any suggestion is welcome.
Discussion posts and replies are publicly visible
Additional ideas here would depend on your use case, if you could elaborate a little there - how/when is this process started, what is it doing when you want it to stop, does it need to continue later or end completely, etc?
Another general option is to have a rule determine if the process should be online or not based on the current time. The process can run through XOR gates between each step, checking this rule to determine if it should be online or not - then continue or end. But I wouldn't know if that could apply cleanly here without additional use case details.
Here is the use case:
And thats it.
Thanks, to confirm further, I'm not clear which one of these is the goal:
1) Block a process from starting after 2 PM, or
2) Attempting to pause or end a process that had already started prior to 2 PM?
Run the process every 30 minutes and then block the process from running after 2PM
Oh! When do processes start? You could literally just create a list of times that the process would start including every half hour interval in which you would like the process to start.
Or you could do if (now() < 2 PM, if now() minutes = 30, run, don't run, don't run)
Every half hour, check to see if your time is before 2 PM and after whatever time the processes start in the morning, only run if the condition you check every half hour returns true.
Yes, sounds like the OP was on the right track here initially but the expression needs adjustment. You should definitely be able to handle this as intended in the Timer Event Advanced Options. We use either constants or time checks under Advanced Options in just about all of our scheduled processes.
Since this is a system-ran scheduled process, if you are stopping based on a static time zone (adjust the hour if the server is on a different time zone) this should do it if you wan to stop processing say 2 PM to midnight:
not(hour(local(now()))>=14)