<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 22 August 2013 10:51, Bryon Baker <span dir="ltr"><<a href="mailto:bbaker@copesan.com" target="_blank">bbaker@copesan.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">







<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="">Trying to create a cron job to move tickets from one queue to another.  This is what I tried which does not work.<u></u><u></u></p>
<p class="">Can some lead me in the direction where I can find a list of RT:Actions?</p></div></div></blockquote><div style>Use the 'package' name defined within any of the files within  /opt/rtX/lib/RT/Action/</div>

<div style><br></div><div style>eg. any of these:<br></div><div style><div># grep package /opt/rt4/lib/RT/Action/* | awk '{ print $2 }' | sed 's/;//'</div><div>RT::Action::AutoOpen</div><div>RT::Action::Autoreply</div>

<div>RT::Action::CreateTickets</div><div>RT::Action::EscalatePriority</div><div>RT::Action::ExtractSubjectTag</div><div style>etc...</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div lang="EN-US" link="blue" vlink="purple"><p class=""><u></u><u></u></p>
<p class=""><u></u> rt-crontool \</p><p class=""><u></u></p>
<p class="">   --search RT::Search::FromSQL \<u></u><u></u></p>
<p class="">  --search-arg "Queue = 'cerby' AND Status = 'closed'" \<u></u><u></u></p>
<p class="">   --action RT::Action::SetQueue \ <u></u><u></u></p>
<p class="">   --action-arg 14 –verbose</p>
<p class="">I get the following error when I run this<u></u><u></u></p>
<p class="">Failed to load module RT::Action::SetQueue.</p></div></blockquote><div style>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.</div>

<div style>eg:</div><div style><br></div><div style>--search-arg 'Queue = "cerby" AND Status = "closed"'<br></div><div style><br></div><div style>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.</div>

<div style><br></div><div style>I hope this helps somewhat at least.</div><div style><br></div></div>-- <br><div>Landon Stewart <LandonStewart@Gmail.com><br></div>
</div></div>