Bug 12031: Task Scheduler not sending mail
authorLiz Rea <liz@catalyst.net.nz>
Thu, 3 Apr 2014 01:49:16 +0000 (14:49 +1300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 27 Oct 2014 13:38:04 +0000 (10:38 -0300)
commitf918d29e38825ca2c8f69c362c61d1c8f0b517b7
treed99f9af9f8ab33509f584c6784223ff9fce78313
parent91eb4252c7a120a6137123175e331dbe2f79dd77
Bug 12031: Task Scheduler not sending mail

At some stage the runreport.pl cronjob was changed to accept longopts, but the scheduler script wasn't changed along with it. This patch fixes the mismatch.

To test:

1. make sure that your user is not in at.deny, and (if applicable/necessary) is in at.allow

1.5 test this on a package install, sending mails will still not work for git installs, even with this patch.

Useful, but not required step: make sure email can be sent from your server, also helpful is access to the Koha user's mail box (to see the bounce messages)

2. create a saved sql report to run

3. Go to Tools -> Task Scheduler and schedule a job to be run, and results emailed to you

4. note that you do not (without the patch) get an email. Make a note of the command it reports it is going to run.

5. apply the patch

6. schedule another job, you will notice that the command to run the scheduled job is slightly changed compared to the one in step 4.

7. Receiving an email when your job runs means the patch worked. Seeing --format= and --to= in the command also means the patch worked, as this is the command that runreport.pl is expecting.

8. Run the koha QA test tool.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: The line that changes is visible in the bottom section,
      "Jobs already entered", with the corrected parameters and
      path used. If you do not have the <supportdir> config
      parameter set up in koha-conf.xml, it defaults to the
      typical package path. If you have the parameter set up,
      the path given matches what you tell it. Only tested in
      git.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
tools/scheduler.pl