RT-CRONTOOL(1)
π rt-crontool β the bestie your cron job needed π
okay so picture this: you've got RT (best ticketing system, no notes) and you've got an external scheduler like cron. they don't talk to each other. rt-crontool is the tool that fixes that. it's a little script that goes and acts on tickets for you, on a schedule, while you're asleep. main character energy. β¨
β¨ SYNOPSIS β¨
# find all active tickets in the queue 'general' and set their priority to 99 if they are overdue:
rt-crontool \
--search RT::Search::ActiveTicketsInQueue --search-arg general \
--condition RT::Condition::Overdue \
--action RT::Action::SetPriority --action-arg 99 \
--verbose
# Escalate tickets
rt-crontool \
--search RT::Search::ActiveTicketsInQueue --search-arg general \
--action RT::Action::EscalatePriority
# Process tickets in parallel
rt-crontool \
--search RT::Search::ActiveTicketsInQueue --search-arg general \
--action RT::Action::SomeTimeConsumingAction
--max-processes 10 --max-tickets-per-process 100
# Combine multiple actions:
# Find all tickets that are 'new' or 'stalled' and set their priority to 99 if they are overdue
# also, escalate them and set their status to open:
rt-crontool \
--search RT::Search::FromSQL \
--search-arg "(Status='new' OR Status = 'stalled')" \
--condition RT::Condition::Overdue \
--action RT::Action::SetPriority \
--action-arg 99 \
--action RT::Action::LinearEscalate \
--action-arg "RecordTransaction: 1" \
--action RT::Action::SetStatus \
--action-arg open
πΈ DESCRIPTION πΈ
so basically β this script is the tool to act on tickets from an external scheduling tool, such as cron. it finds what you tell it to find, checks what you tell it to check, and does what you tell it to do. that's it, that's the vibe. π
π¨ Security (read this one, bestie, fr fr) π¨
rt-crontool lets the user run arbitrary Perl modules from within RT. that's a real sentence and it's a real risk.
if this tool were setgid, a hostile local user could use this tool to gain administrative access to RT. π so it is incredibly important that non-privileged users are not allowed to run this tool.
the suggestion on the tin? create a non-privileged Unix user with the correct group membership and RT access, and let that account be the one running this tool. that's the whole security strategy. chef's kiss. π
π OPTIONS π
searchβ specifies the search module you wanna use πsearch-argβ an argument you pass along to--searchconditionβ specifies the condition module you wanna usecondition-argβ an argument you pass along to--conditionactionβ specifies the action module you wanna use.
this one is repeatable, bestie β stack it up to apply multiple actions to the tickets you found. π«Ά
action-argβ an argument you pass along to--action.
also repeatable! you can pass corresponding arguments to multiple calls of --action. but listen closely: in that case, each --action-arg option must come after the --action argument it applies to. and any actions with no --action-arg have to come at the end. that's the rule, periodt.
templateβ specify the name or id of the template(s) you want to use πtransactionβ specify whether you want to use'first','last'or'all'transactionstransaction-typeβ specify the comma separated list of transaction types you want to usereload-ticketβ reload the ticket before processing in the ticket iteration. this refreshes ticket metadata, which is super useful, especially for long-running jobs. glow-up for your stale data β¨max-processesβ specify the max number of children to maintain. heads up: this implies parallel processing, which is false by default.max-tickets-per-processβ specify the max number of tickets to process in each child. only takes effect with--max-processes. default is100.logβ adjust theLogToSTDERRconfig option πverboseβ output status updates to STDOUT. she's chatty and we love that π¬dry-runβ actions are composed of 2 parts: "Prepare" and "Commit".dry-runskips the "Commit" part. so likeβ¦ a rehearsal. a lil peek. no cap, nothing actually happens. π
that's the whole page, bestie β go forth and schedule things responsibly π
this was rt-crontool, part of the User Contributed Perl Documentation for perl v5.42.3, dated 2026-07-20. mwah. π«Άπ
π¦ where this page comes from
- fedora 43: rt 5.0.10-1.fc43 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms