Hi everyone,
I’m trying to implement a system where tickets are automatically escalated to a different queue or owner if not resolved within a certain number of hours (e.g., 48 hours since creation).
I’ve seen some examples using cron and rt-crontool, but I was wondering:
Is there a recommended way to handle this within RT itself (maybe with Scrips)?
Can we use custom conditions for time-based escalation (e.g., only escalate if status is still “open”)?
Would love to see how others have tackled this. Bonus points if you have a Scrip snippet to share 
Thanks!
Jhonn Mick
Crontool is the move!
bin/rt-crontool \
--search RT::Search::FromSQL --search-arg "Status = '__Active__' AND LastUpdated < '48 hours ago'" \
--action RT::Action::SetQueue --action-arg "Some Queue" \
--transaction last
Something like that I’d think
Worth noting the scrips only get executed by RT when a transaction takes place, so the rt-crontool that @knation posted is exactly what you do want to be using if you want this time based escalation to happen even if nobody is interacting with the ticket.
Also note that starting in RT 5.0.8 and RT 6, you can create these in the web UI at Admin > Tools > Scheduled Processes. It’s the same mechanics as crontool, and can be managed and checked via the web interface.