[]
        
(Showing Draft Content)

Create a Scheduled Task to Run a Dashboard

Once you create a scheduled task in Wyn Enterprise, the run result of the dashboard is automatically generated at the specified time or interval. You can share the result to the designated email address in the form of a link.


In Wyn Enterprise, a scheduled task can be set to manual, one-time, or scheduled depending on your requirements. For each execution mode, there is a different set of fields that should be specified for a scheduled task to run successfully. For more details, please have a look at the below sections.

To Schedule a Task

Follow the below steps to schedule a task for a dashboard.

Note: For successful task execution, make sure that the dashboard worker service is running in the background, else the scheduled task will fail to execute. To get the status of the dashboard worker service, navigate to the Node Management page on the Admin Portal.

  1. On the Document Portal, select the dashboard you want to schedule.

  2. With the dashboard selected, click the Info button on the top-right corner of the portal.

  3. In the Info panel that appears, navigate to the Tasks tab and click the + Add Task button to create a new scheduled task.


    Create a new scheduled task


    Add Task dialog is displayed.

    Add Task Dialog


    In the Basic Information, enter the following details:

  4. Enter the task description in the DETAILS field.

  5. By default, tasks are manually scheduled in Wyn Enterprise. To create a task that runs at fixed intervals of time, set the Execution field to 'Scheduled'.


    Description and Execution Mode

  6. From the Choose Template dropdown, select a suitable schedule template that matches your requirements. The list shows both the built-in and custom templates on the server. For more information on how to create a custom schedule template, visit this article.

    Choose a schedule template

    The Start and the End fields pick the default values specified in the chosen schedule template. These default values are unchangeable.

    Start and End Dates for Schedule

    Note: If the chosen template has predefined settings for the email delivery, then its corresponding fields like Email To, Reply To, Subject, and Body are set to default values as specified in the template, and hence can't be modified.

  7. Click the Next button.

    Here you need to enter the Export Settings.

    Specify Export Settings

  8. From the EXPORT FORMAT dropdown list, select the option PDF. Dashboards can be exported in the PDF format.

    Dashboard Export PDF

Note: These PDFs can be rendered using the following browsers: Chrome, Firefox, and Edge. Refer section Setting up Browser for PDF Export for details.

  1. You can check the Advanced Settings option to specify the advanced export properties for the chosen format.

  2. In case your dashboard contains any parameter(s), you need to enter valid parameter value(s) or set the value(s) to default. Else, a message saying 'Invalid Parameters' will be displayed.

    Empty parameters section


    If your dashboard has no parameters, then a message 'Dashboard has no parameters' will be displayed.

  3. Enter the parameters and click the Next button.

    Enter Parameters and click Next

  4. If the delivery method is not specified in the schedule template, then specify the delivery option from the DELIVERY dropdown list.

    Choosing delivery type


    If you choose 'Email' as the delivery method, then specify the recipient email address in Email To, the Reply-To email address, the subject line, and the body message for the email.

    Note: Use comma(s) to separate multiple email addresses.

  5. You can also control how to share the result on the email by either sending it as a file attachment or providing a link in the email body to download the result.

    Choosing attachement type


    Once the information is specified, the Delivery details will be displayed as below:

    Delivery Page Details

Note: If you choose 'Local Storage' as the delivery method, then specify how to store the result on the system server - permanently, until a specific date, or once the defined period expires.

If you choose 'File Share' as the delivery method, then specify the file name and the shared location for storing the result.

If you choose 'External Storage' as the delivery method, then specify the storage type and storage name to be used.

  1. Click the OK button to save the settings. Note that the newly created task is listed under the Scheduled Tasks section.

    List of scheduled tasks

  2. Click the Run Task button to execute the scheduled task manually out of the recurring iteration whenever you want, or to check whether a scheduled task runs correctly with the applied settings.

    Run Task Button

    From the Task History tab, you can check whether the scheduled task is completed or failed.

Setting up Browser for PDF Export

Two new setting nodes BrowserForExport and BrowserPathForExport are added in the DashboardWorker node of the wyn.config file. Details for both the setting nodes are as below:

Property

Description

BrowserForExport

This represents the browser type. Available values are "chrome" and "firefox". For Edge you should use the value as "chrome" only.

BrowserPathForExport

This represents the browser executable file path. Example:

  • Linux path : "/usr/bin/chromium-browser".

  • Windows path : "C:\Program Files\Google\Chrome\Application\chrome.exe".

  • If you are using docker to deploy the Wyn, the external chrome should be mounted as docker volume.

Note: These 2 settings are priority over the old setting: ChromeExecutablePath.

Sample Code

  • BrowserForExport and BrowserPathForExport for Chrome


<?xml version="1.0" encoding="utf-8"?>
<SystemConfig xmlns:sys="https://extendedxmlserializer.github.io/system" xmlns="clr-namespace:ConfigMigration.Configuration.V60;assembly=ConfigMigration">
  <Services>
    <CotWorker />
    <DashboardWorker>
       <BrowserForExport>chrome</BrowserForExport>
       <BrowserPathForExport>C:\\Program Files\\Google\Chrome\\Application\\chrome.exe</BrowserPathForExport>
    </DashboardWoker>
    <AnalysisDBService />
  </Services>
</SystemConfig>
  • BrowserForExport and BrowserPathForExport for Edge

<?xml version="1.0" encoding="utf-8"?>
<SystemConfig xmlns:sys="https://extendedxmlserializer.github.io/system" xmlns="clr-namespace:ConfigMigration.Configuration.V60;assembly=ConfigMigration">
  <Services>
    <CotWorker />
    <DashboardWorker>
       <BrowserForExport>chrome</BrowserForExport>
       <BrowserPathForExport>C:\\Program Files (x86)\\Microsoft\\Edge Dev\\Application\\msedge.exe</BrowserPathForExport>
    </DashboardWoker>
    <AnalysisDBService />
  </Services>
</SystemConfig>
  • BrowserForExport and BrowserPathForExport for Firefox

<?xml version="1.0" encoding="utf-8"?>
<SystemConfig xmlns:sys="https://extendedxmlserializer.github.io/system" xmlns="clr-namespace:ConfigMigration.Configuration.V60;assembly=ConfigMigration">
  <Services>
    <CotWorker />
    <DashboardWorker>
       <BrowserForExport>firefox</BrowserForExport>
       <BrowserPathForExport>C:\\Program Files\\Firefox Developer Edition\\firefox.exe</BrowserPathForExport>
    </DashboardWoker>
    <AnalysisDBService />
  </Services>
</SystemConfig>

Note : For the Edge browser, you need to update the WynService's permission to the administrator.

To Manage a Scheduled Task

To manage a scheduled task, click the Actions button Actions Button in the Tasks tab. You can use this button to disable, edit, duplicate, or delete a scheduled task.


Modifying the scheduled task

  • Disable - Deactivates all the future scheduled executions for that task. You can resume the task execution once you enable the scheduled task by clicking the Actions button.

  • Edit - Enables you to modify the existing information for that task like its name, execution type, timings, export format, and so on.

  • Duplicate - Creates a new task with all the settings defined the same as in the originally scheduled task. This way, you can reuse the settings and save your time and effort in re-creating a scheduled task from scratch.

  • Delete - Discards the scheduled task. Note that once you delete a scheduled task, it is gone forever.

Task Execution Modes

The below section describes the fields available for the different task execution modes supported in Wyn Enterprise - manual, one-time, and scheduled.

Note: MS Teams does not support deployment on public network due to multi-factor authentication. However, you can use email to send notifications to channels.

Manual Task Execution Mode

For the manual execution mode, you need to specify the following fields in the Info panel.

Property

Description

Details

Enter a description for the task.

Execution

Choose the execution mode for the task. In this case, set it to 'Manual'.

Parameters

Input valid parameter value(s) for the dashboard if any.

Delivery

Select the delivery method for sharing the report result. The supported delivery methods are email, local storage, file share, external storage, and application message.

Email - Specify the recipient's email address, the reply-to email address where the recipient can respond, the subject line, and the body message for the email. You can also control how to share the result on the email by either sending it as a file attachment or providing a link in the email body to download the result.

If the export format for the report is set to 'Image' or 'HTML', you can also insert the result into the email body.

Local Storage - In this method, the result is stored on the system server permanently, until a specific date, or once the defined period expires.

File Share - Input the file name and shared location for the result. You can check the Overwrite Existing option to replace the previous report result with the latest one.

If you set the delivery method to 'Email' or 'Local Storage', you can choose whether to give access to any user (including non-Wyn Enterprise users) for viewing or downloading the report result through the Allow Anonymous option.

External Storage - In this method, you can select the storage type and name of the storage to send the result to a target location.

This method is only available to the users for whom the admin user has enabled the permissions on the Admin Portal.

Application Message - In this method, the result is shared by sending a message notification to Slack or MS Teams application. Enter the message details including the subject, body, and recipients (channels or users) into the respective fields. Specify how to share the result in the application message, as an attachment link or a download link.

This method is only available if the admin user has enabled the notifications on the Admin Portal for either Slack or MS Teams, or both.

One-Time Task Execution Mode

For the one-time execution mode, you need to specify the following fields in the Info panel.

Property

Description

Details

Enter a description for the task.

Execution

Choose the execution mode for the task. In this case, set it to 'One-Time'.

Start

Set the start date and time for the task. The start time can't be set to any time less than 5 minutes from the current time.

Parameters

Input valid parameter value(s) for the dashboard if any.

Delivery

Select the delivery method for sharing the report result. The supported delivery methods are email, local storage, file share, external storage, and application message.

Email - Specify the recipient's email address, the reply-to email address where the recipient can respond, the subject line, and the body message for the email. You can also control how to share the result on the email by either sending it as a file attachment or providing a link in the email body to download the result.

If the export format for the report is set to 'Image' or 'HTML', you can also insert the result into the email body.

Local Storage - In this method, the result is stored on the system server permanently, until a specific date, or once the defined period expires.

File Share - Input the file name and shared location for the result. You can check the Overwrite Existing option to replace the previous report result with the latest one.

If you set the delivery method to 'Email' or 'Local Storage', you can choose whether to give access to any user (including non-Wyn Enterprise users) for viewing or downloading the report result through the Allow Anonymous option.

External Storage - In this method, you can select the storage type and name of the storage to send the result to a target location.

This method is only available to the users for whom the admin user has enabled the permissions on the Admin Portal.

Application Message - In this method, the result is shared by sending a message notification to Slack or MS Teams application. Enter the message details including the subject, body, and recipients (channels or users) into the respective fields. Specify how to share the result in the application message, as an attachment link or a download link.

This method is only available if the admin user has enabled the notifications on the Admin Portal for either Slack or MS Teams, or both.

Scheduled Task Execution Mode

For the scheduled execution mode, you need to specify the following fields in the Info panel.

Property

Description

Details

Enter a description for the task.

Execution

Choose the execution mode for the task. In this case, set it to 'Scheduled'.

Choose Template

Select a schedule template for the task. A schedule template is used to define the recurring interval at which to run a dashboard and the email delivery details. See this article for more information on schedule templates.

Parameters

Input valid parameter value(s) for the dashboard if any.

Delivery

Specify the recipient's email address, the reply-to email address where the recipient can respond, the subject line, and the body message for the email.