2

When configuring a Mail Report to be sent via Scheduled Jobs, using 'mail_report' API call, I need to pass the 'instanceId' and 'format' parameters.

For the 'format' parameter I have the options 'csv' (to output the report as a CSV file), 'print' (to output the report as printer-friendly HTML) or if I ignore the parameter, I have a PDF report.

Also, I can input a sendmail=0, that tells the job NOT to email the report, so I can use this in combination with print or csv format to only write report to stdout.

If I use the 'format=print', the job always write to stdout. My problem is that stdout, in this case, is the server's cron, what makes cron send an email to the administrator with the report, what I don't want to happen. Is is possible to tell the job NOT to write the report to stdout?

2

Yes, if the problem is the stdout being sent to cron, I can avoid it appending "1>/dev/null 2>/dev/null" to the end of the command in the cron script called. This makes both stdout and stderr to be sent to null.

  • This is odd behaviour. Would it not make more sense to have a parameter configurable via the UI to enable/disable output via stdout? – Graham Nov 14 '17 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.