On Tue, 2007-06-05 at 11:01 -0700, Jeff Stark wrote: > Hi everyone....I am a bit of a newbie when it comes to Linux (REHL) > and I am trying to add this RT command as a cron job via crontab. > > I am logged in as root and when I run this manually: > > /opt/rt3/bin/rt list -i "Status = 'in-review' AND Resolved < '2 days > ago'" | /opt/rt3/bin/rt edit - set status=resolved > > it works great. > > When I add it to crontab it doesn't run and here is result of... > > crontab -l > 01 00 * * * /opt/rt3/bin/rt list -i "Status = 'in-review' AND > Resolved < '2 days ago'" | /opt/rt3/bin/rt edit - set status=resolved > > /var/log/cron > > Jun 5 10:01:01 dcrt crond[8839]: (root) CMD (/opt/rt3/bin/rt list -i > "Status = 'in-review' AND Resolved < '2 days ago'" | /opt/rt3/bin/rt > edit - set status = 'resolved'^M) > > Everything appears correct....though I am not sure what the ^M > indicates at the end of the cron command in the log file.
Hi Jeff, The ^M just means that you copied the command line from a MS Windows application into your terminal application - it's a Windows return character. Do a 'crontab -e' go to the end of the line and delete the any trailing spaces - that should remove it from your logs and maybe fix your problem. IF it doesn't, put the command into a shell script and run that via cron - maybe cron doesn't have a nice default shell or something. Ken. -- This email has passed through an IE Internet MailWall gateway and has been screened for known viruses, potential viruses and malicious code. IE Internet.com MailWall (http://ieinternet.com/mailwall/) -- _______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: [EMAIL PROTECTED] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
