3 # Author: Petter Reinholdtsen
6 # Based on shell version previously on
7 # <URL:http://wiki.bestpractical.com/index.cgi?ConfigureEscalationExample>
9 # <URL:http://wiki.bestpractical.com/index.cgi?ConfigureEscalation>
11 # Run from cron as user rt-user, and make sure rt-user have
12 # permissions ShowTicket and ModifyTicket
17 # Location of RT's libs and scripts
18 # Remember to change to correct path on current RT instance
19 use lib '/www/data/rt/rt-perl/current-perl10/share/perl5';
20 use lib '/www/data/rt/rt-perl/current-perl10/lib/perl5';
21 use lib '/www/data/rt/rt-perl/current-perl10/lib64/perl5';
23 use lib ("/www/var/rt/local/lib", "/www/var/rt/lib");
25 my $crontool = "/www/var/rt/bin/rt-crontool";
28 use RT::Interface::CLI qw( CleanEnv );
30 # Clean our the environment
33 # Load the RT configuration
39 # escalate tickets for all queues
40 system("$crontool --search RT::Search::FromSQL --search-arg " .
41 "\"(Status='new' OR Status='open' OR Status = 'stalled')\" " .
42 "--action RT::Action::LinearEscalate --action-arg \"UpdateLastUpdated: 0\"");