Tech Tip: Quoting email addresses when scheduling eHealth reports via the command line on Linux

Document created by kk_sup Employee on May 7, 2015Last modified by SamCreek on Dec 17, 2016
Version 2Show Document
  • View in full screen mode

Quoting email addresses when scheduling eHealth reports via the command line on Linux

 

The full argument list after -args should always be surrounded by single quotes.

 

Within the argument list if the -after "nhMail 'email1@domain.tld email2@domain.tld'"  is being used to send the report to multiple recipients, the single quotes around the list of email addresses must be escaped as in the following example:

 

nhSchedule -schedule "Trend Report" -time "09:21 AM" -daily yyyyyyy -args '-rptType trend -rptName Standard -subjType element -elemType lanWan -subjName 1002804,1002806,1002805 -autoRange prev24Hours -tz est5edt -vars bits -divBy time -chartType line -chartOpts standard -gran asIs -ascii $(SUBJECT)_$(DATE)_$(TIME).csv -pdf $(SUBJECT)_$(DATE)_$(TIME).pdf -outputDir $(NH_HOME)/output/$(_reportType)/ -after "nhMail '\''address1@domain.com address2@domain.com'\''" -web $(SUBJECT)_$(DATE)_$(TIME) -webUser admin -namesType names'

 

 

To clarify further, around the list of emails use:

 

single quote backslash single quote single quote

 

-after "nhMail '\''address1@domain.com address2@domain.com'\''"

Attachments

    Outcomes