Check for Tasks
Cadence Weekly
Sites production
Initial | Recurring | |
---|---|---|
Estimated Time | 2 min | 2 min |
Benefits:
- Increase awareness
- Increase reaction times
Goal
Checking for new tasks regularly helps not only to curate what is necessary (cadence, duplicates, etc), but also encourages reviews of batch windows, task concurrencies, and any other implications against the Qlik schedulers. The above may influence architectural patterns and dictate the need for reload task pinning.
Note
This page will outline three methods for accomplishing this activity (using the QMC, using Operations Monitor, and using a Qlik CLI for Windows script). The QMC approach is generally appropriate for most environments. The Operations Monitor approach can be integrated with other activities (i.e. by saving any selections in a bookmark) to decrease overall time spent performing administrative tasks. The Qlik CLI for Windows approach is more appropriate for environments where automation is required.
Table of Contents
QMC - Tasks
In the QMC, select Tasks:
In the upper right hand side of the screen, select the Column selector, and then select the Created column.
Now select the filter icon for the Created column, and then select the filter of Last seven days, or the desired range.
Lastly, review the resulting table and view any new tasks.
Hub - Operations Monitor
Open up the Hub and navigate to Monitoring apps stream. Select the Operations Monitor application.
From the App overview page, select the Task Details sheet.
Select Duplicate, as we will add a column that isn’t currently in a table.
In Edit mode, select the Reload Summary Statistics table and shrink it to allow for more real estate, as another table will be added.
Drag in a new table object, and add the dimension of Task Name.
Next, the Task Created dimension needs to be added to that table. Note that reloads from the Hub and manual reloads will not show a created date.
It is now possible to sort by the Task Created column to view new tasks.
For deeper analysis into tasks, refer to Analyze Tasks
Get List of New Tasks (Qlik CLI for Windows)
The below script snippet requires the Qlik CLI for Windows.
The script will bring back any reload tasks with a Created Date that is greater than or equal to x days old. The script will then store the output into a desired location in either csv or json format.
Script
# Function to collect tasks that were created within the last x days
################
## Parameters ##
################
# Assumes default credentials are used for the Qlik CLI for Windows Connection
# machine name
$computerName = '<machine-name>'
# leave empty if windows auth is on default VP
$virtualProxyPrefix = '/default'
# set the number of days back for the app created date
$daysBack = 7
# directory for the output file
$filePath = 'C:\tmp\'
# desired filename of the output file
$fileName = 'new_tasks'
# desired format of the output file (can be 'json' or 'csv')
$outputFormat = 'json'
################
##### Main #####
################
# create filePath
if (Test-Path $filePath) {
} else {
New-Item -ItemType directory -Path $filePath | Out-Null
}
# set the output file path
$outFile = ($filePath + $fileName + '_' + $(Get-Date -f "yyyy-MM-dd") + '.' + $outputFormat)
# set the date to the current time minus $daysback
$date = (Get-Date -date $(Get-Date).AddDays(-$daysBack) -UFormat '+%Y-%m-%dT%H:%M:%S.000Z').ToString()
# set the computer name for the Qlik connection call
$computerNameFull = ($computerName + $virtualProxyPrefix).ToString()
# connect to Qlik
Connect-Qlik -ComputerName $computerNameFull -UseDefaultCredentials -TrustAllCerts
# check the output format
# get all apps that are created >= $date and >= $byteSize
# output results to $outfile
If ($outputFormat.ToLower() -eq 'csv') {
Get-QlikReloadTask -filter "createdDate ge '$date'" -full | ConvertTo-Csv -NoTypeInformation | Set-Content $outFile
} Else {
Get-QlikReloadTask -filter "createdDate ge '$date'" -full | ConvertTo-Json | Set-Content $outFile
}
Tags
#weekly
#asset_management
#tasks
#operations_monitor