[rt-users] Using rt-crontool w/ MySQL date and time functions.

Frances Albemuth frances.cincinattus at gmail.com
Mon Dec 11 11:38:00 EST 2006


 Hi,

  I've been building cron jobs for automated auditing of ticket status
in my organization similar to what's described in the
"TimedNotifications" article in the Wiki.  Because the "3 days"
nomenclature for the query seems to be incorrect and doesn't produce
results (any longer? Using RT 3.6.1), I modified the query to exploit
MySQL's date/time functions.  In this vein, I'm using the same query
syntax that is functional when run directly against the DB, namely
something like this:

  LastUpdated < now() - interval 3 day AND Status != 'stalled' AND
Status != 'resolved' AND Status != 'rejected'

 This works fine when run directly against the DB, as mentioned above,
but rt-crontool complains:

  Error near ->now<- expecting a VALUE in LastUpdated < now() -
interval 3 day AND Status != 'stalled' AND Status != 'resolved' AND
Status != 'rejected'
(/opt/rt3/local/lib/RT/Tickets_Overlay_SQL.pm:487)

 Any pointers?

 Thanks in advance,

 -FC



More information about the rt-users mailing list