(Showing Draft Content)

Create a Cleanup Task

Cleanup tasks are specifically designed to clear the dataset cache stored within a multi-tenant environment to speed up the data refresh performances and free up the unused cache space.

Typically, in a multi-tenant environment, there are separate dataset cache for each known tenant, that are refreshed only once at a specified time or periodically as per the scheduled time. But, in case a tenant leaves or no longer uses the dataset (or uses the dataset often), then refreshing a dataset cache for such a stale tenant is useless because it will only lead to performance and storage-related issues.

To avoid such issues, a system administrator creates a cleanup task. Also, it is his responsibility to refresh the dataset cache so that the dashboards using the expired dataset cache can be previewed.

Note: Data cache is only available for dashboards datasets.

Task Execution Modes

Following are the different types of execution modes available for a cleanup task -

  • One-Time: Runs the task at the specified time. This type of task is executed only once and gets deleted after the execution. It provides you the flexibility to specify the date and time to schedule the task.

  • Scheduled: Runs the task at fixed intervals of time. For example, you can use a template to schedule a cleanup task to run every Monday at 5:10 am. The schedule template uses predefined date and time settings for the task.

To Clean a Dataset Cache

Let's assume that you want to clear away all the unused dataset cache that was last modified a week earlier. So, to do this, set the task type to cleanup and the execution type to scheduling, as defined in the following steps.

  1. On the Resource Portal, select the dataset for which you want to clean the cache.

  2. With the dataset selected, click the Info button on the top-right corner of the Resource Portal.

  3. In the window that appears on the right side of the Resource Portal, navigate to the Tasks tab and click the + Add Task button to create a new scheduled task.

    Create a new scheduled task

  4. Enter the task description in the Details field as shown.

    Navigating to the Tasks tab

  5. Set the Task Type field to 'Cleanup' as shown.

    Setting the Task Type to Cleanup

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

    Specifying the scheduling settings

  7. In the Expiry Period field, enter an appropriate expiry time in hours, weeks, or months to clean up the dataset cache that is not used since the specified time period. In this example, set the Expiry Period to one week.

    Specifying the expiry period

  8. The Choose Template field displays the available schedule templates. You can select any one from the list displayed, for example, select 'Clear dataset cache at 12:00 AM each Monday'. For more information on schedule template, visit this page.

    Choose a schedule template

  9. The Start and the End fields pick up the default values specified in the chosen schedule template.

  10. Enter the email details in the Email Notification field. An email notification will be sent to the specified email address on unsuccessful task execution.

    Set Email Details in the field

  11. Click the Create Task button to save the settings. Note that the task is listed in the scheduled tasks as shown in the following image.

    List of scheduled tasks

Note: Dataset cache for a dashboard with no scheduled cleanup tasks is automatically cleared in every three days.

To Manage a Cleanup Task

To manage a cleanup 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.

  • 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 original scheduled task. This way, you can easily save your time and effort since you no longer have to re-create a scheduled task from scratch.

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

    Modifying the scheduled task