7 Replies Latest reply on Aug 16, 2018 8:21 AM by Jeff Strauss

    Send an alert if tacmd export fails due to session out on tableau server

    swathi.j

      Hi all,

       

      I'm new to scripting. I have the following code to download a report from the tableau server as a pdf and send as an email to external users through email. It is working as expected but I want to send an alert email to the publisher if the tabcmd export fails to download the report as a pdf to the specified location when there's a session out on tableau server. Any help/advice would  be helpful. Thanks in advance!

       

      cd /home/app/

      ./tabcmd  login --server *********  --user *****  --password ****** --no-certcheck --cookie

      ./tabcmd export "XYZREPORT?:refresh" --fullpdf -f "/home/app/pdfDownloads/XYZREPORT.pdf" --server ***** --user *****  --password ****--no-certcheck

      (printf "%s\n%s\n" " XYZ Report as of `TZ=":US/Eastern" date` If you would like to see the detailed report please click the link : https://XYZREPORTLINK ") |mailx -s "XYZ" -r "PUBLISHER" -a /home/app/pdfDownloads/XYZREPORT.pdf  'EXTERNALUSER'

      mv /home/app/pdfDownloads/XYZREPORT.pdf /home/app/pdfDownloads/Archive/

      ./tabcmd logout