RT-CRONTOOL(1)

πŸ“¦
version 5.0.10 Β· 4 versions
, in fedora 43

πŸŽ€ 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 --search
  • condition β€” specifies the condition module you wanna use
  • condition-arg β€” an argument you pass along to --condition
  • action β€” 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' transactions
  • transaction-type β€” specify the comma separated list of transaction types you want to use
  • reload-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 is 100.
  • log β€” adjust the LogToSTDERR config 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-run skips 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