Scheduling Your Reports
The Schedule Addon
The ReportList addon integrates with the Schedule addon, allowing you to easily set up regular report transmission.
The Manual Way
Reports can be sent manually at any time by using a web URL.
This URL is <siteurl>/reportlist/mailout - for example, if you were send emails for the default site on server MYARDISERVER, the complete URL would be http://MYARDISERVER/s/default/reportlist/mailout
You can add parameters to change the behaviour of the mailout…
Parameter | Usage |
---|---|
bundle | The name of the report bundle you want to send |
title | The text to append to the email subject and file name - if you have multiple reports, this lets you differentiate them into “Daily”, “Weekly”, “Night Shift” etc. |
regen | Rebuild all of the reports (useful if the last set of reports were incorrect due to the data source being down/unavailable) |
test | Prepare reports and log, but don't actually deliver the files (ie. don't send or upload) |
The specific email address you'd like to send to. Useful in testing. | |
resend | Send 'stale' reports (ones that haven't been freshly generated). Useful when resending your report emails due to your email server being unavailable |
bundleonly | Generate only the report bundle file that is available through the web UI - don't send emails |
keepbundle | Don't re-generate the bundle file unless it's needed |
site | Overrides the default site name sent from ARDI in the subject of the email |
method | Restrict transmission to a single method (ie. 'email', 'sharepoint' etc.) |
This web link can only be run via administrators, or locally (ie. any user can call this link if the call originates from the server itself).
Scheduling The Reports
To schedule your reports, set up a Scheduled Task (Windows) or a Cron job (Linux) that calls this URL.
In Linux, this can be as simple as making a script that contains 'wget' followed by the URL.
On Windows it can be slightly more complicated, as there isn't a standard command-prompt application to fetch web results. As such, we suggest creating the following PS1 (Windows PowerShell) script…
Invoke-WebRequest -Uri 'MYSITE/reportlist/mailout' -TimeoutSec 6000
Remembering to replace 'MYSITE' with your correct URL
To actually run this in Windows, you'll need to create a scheduled task and add a 'Start a Program' action.
You can't directly execute the PS1 file, so you'll want to run powershell itself, sending the location of your PS1 script as a parameter.