[rt-users] RTCrontool

Landon landonstewart at gmail.com
Thu Aug 22 19:48:48 EDT 2013


On 22 August 2013 10:51, Bryon Baker <bbaker at copesan.com> wrote:

>  Trying to create a cron job to move tickets from one queue to another.
> This is what I tried which does not work.****
>
> Can some lead me in the direction where I can find a list of RT:Actions?
>
Use the 'package' name defined within any of the files
within  /opt/rtX/lib/RT/Action/

eg. any of these:
# grep package /opt/rt4/lib/RT/Action/* | awk '{ print $2 }' | sed 's/;//'
RT::Action::AutoOpen
RT::Action::Autoreply
RT::Action::CreateTickets
RT::Action::EscalatePriority
RT::Action::ExtractSubjectTag
etc...

> ****
>
> ** rt-crontool \
>
> **
>
>    --search RT::Search::FromSQL \****
>
>   --search-arg "Queue = 'cerby' AND Status = 'closed'" \****
>
>    --action RT::Action::SetQueue \ ****
>
>    --action-arg 14 –verbose
>
> I get the following error when I run this****
>
> Failed to load module RT::Action::SetQueue.
>
Your command line looks mostly fine to me except I'd use single quotes to
enclose the parameter and double quotes to enclose data within the
parameter.
eg:

--search-arg 'Queue = "cerby" AND Status = "closed"'

Did you modify  /opt/rtX/lib/RT/Action/SetQueue.pm ?  It it's not
executable then rt-crontool will not be able to load the module.  I had the
same issue when I started learning how to deal with modules and creating
new ones.  I haven't figured out how to debug what line is causing it to
not load though.  There's probably some one liner that will tell you where
the syntax error is but I don't know what that line is.  Using the rt.log
to find out why it didn't execute doesn't help either unless it's executing
as a result of a scrip.

I hope this helps somewhat at least.

-- 
Landon Stewart <LandonStewart at Gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130822/37f85d10/attachment.htm>


More information about the rt-users mailing list