Re: Where to put crontool scripts?

Matt Zagrabelny <[email protected]> Wed, 4 Jan 2017 10:19:01 -0600
Newsgroups gmane.comp.bug-tracking.request-tracker.user
Message-ID <CAOLfK3WRcOtyTz9tWgB4mUmwd0=KQKJQP+adTz6Fxyg=ZqAbMQ@mail.gmail.com>
On Wed, Jan 4, 2017 at 10:13 AM, Alex Hall <[email protected]> wrote:
> Hi all,
> I'm just wondering if there's a conventional place to store scripts that run
> crontool jobs? I've got one to notify people of old tickets, but I'll be
> making more, now that this one is working. Thanks again for all the help
> with that script, by the way.

We just have the whole script in the crontab:

% sudo crontab -l -u rtcrontool
[...]
15 8-16 * * 1-5 /opt/rt4/bin/rt-crontool --log=warning --search
RT::Search::FromSQL --search-arg ' Queue = "Systems" AND Owner =
"Nobody" AND ( Status = "new" OR Status = "open" ) AND ( Starts IS
NULL OR Starts <= "now" ) ' --condition
RT::Condition::CreatedBusinessHoursAgo --condition-arg 4 --action
RT::Action::MailAdminCcs --transaction-type Create --transaction last
--template "Unowned Ticket"
[...]

-m