rt-crontool(1)

๐Ÿ’– rt-crontool โ€” a Request Tracker reference โœจ

okay bestie, listen. this is your manual page for rt-crontool, straight out of the Request Tracker Reference, and it's literally the little command-line bestie that lets you poke Request Tracker from the outside. ๐Ÿ’…


๐ŸŒธ NAME ๐ŸŒธ

rt-crontool โ€” command-line interface to Request Tracker ๐ŸŽ€


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

so here's the vibe, four whole moods of rt-crontool for you:

# 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 โœจ

This script is a tool to act on tickets from an external scheduling tool, such as cron. like, it's the lil bridge between your crontab and your RT. no cap. ๐ŸŒˆ

๐Ÿ”’ Security: (read this part, fr fr)

This tool allows the user to run arbitrary Perl modules from within RT. If this tool were setgid, a hostile local user could use this tool to gain administrative access to RT. It is incredibly important that non-privileged users not be allowed to run this tool. It is suggested that you create a non-privileged Unix user with the correct group membership and RT access to run this tool.

๐Ÿšจ bestie. BESTIE. this is the part where you sit up straight. arbitrary Perl modules = a hostile local user could get admin access to RT if this thing were setgid. don't let non-privileged users run it. make a non-privileged Unix user, give it the right group membership and RT access, and run it as that girl. periodt. ๐Ÿ’€

๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • --search โ€” Specify the search module you want to use ๐Ÿ”
  • --search-arg โ€” An argument to pass to --search
  • --condition โ€” Specify the condition module you want to use ๐ŸŽฏ
  • --condition-arg โ€” An argument to pass to --condition
  • --action โ€” Specify the action module you want to use.

This option may be repeated to apply multiple actions to found tickets. (obsessed, honestly โ€” stack those actions ๐Ÿ’…)

  • --action-arg โ€” An argument to pass to --action.

This option may be repeated to pass corresponding arguments to multiple calls of --action. In this case, each --action-arg option must come after the --action argument it applies to. Actions with no --action-arg must come at the end. ๐Ÿซถ

  • --template โ€” Specify name or id of template(s) you want to use ๐Ÿ“
  • --transaction โ€” Specify if you want to use either 'first', 'last' or 'all' transactions
  • --transaction-type โ€” Specify the comma separated list of transactions' types you want to use
  • --reload-ticket โ€” Reload ticket before processing in tickets iteration. This is to refresh ticket metadata, which is useful especially for long-running jobs. (iconic for those marathon jobs that just keep going ๐Ÿ˜ฎโ€๐Ÿ’จ)
  • --max-processes โ€” Specify the max number of children to maintain. 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 take effect with --max-processes. Default is 100.
  • --log โ€” Adjust LogToSTDERR config option
  • --verbose โ€” Output status updates to STDOUT ๐Ÿ”Š
  • --dry-run โ€” Actions are composed of 2 parts: "Prepare" and "Commit". "dry-run" skips the "Commit" part. ๐Ÿ™ˆ (perfect for when you wanna peek without committing, iykyk)

๐ŸŒธ that's the whole page, bestie! go forth and cron responsibly. ๐Ÿ’œ

perl v5.40.1 ยท 2026-06-21 ยท rt-crontool(1) โ€” stay slaying, and remember: non-privileged users stay OUT of this tool. ๐Ÿ˜Œโœจ

๐Ÿ“ฆ where this page comes from