Skip to main content
SnapCenter 4.7 cmdlets

Add-SmReportSchedule

Contributors

Creates a schedule to automatically trigger the reports based on the user privileges.

Syntax

Add-SmReportSchedule [-Name]  <String>  [-Plugin]  <PluginCode>  [-ScheduleType]  <String>  [-DayOfTheWeek]  <String>  [-DayOfTheMonth]  <String>  [-TriggerTime]  <String>  [-DocumentType]  <String>  [-FromEmail]  <String>  [-Recipients]  <String>

Detailed Description

Creates a report schedule, which generates daily, weekly, or monthly reports and sends it to the specified e-mail ids as per the user privileges.

Parameters

Name Description Required? Pipeline Input Default Value

Name

Specify the name to create a report schedule. A valid schedule name can only include alphabets, numbers, hyphens, and underscores.

true

true (ByPropertyName)

Plugin

Specify the plug-in code to generate the report. For custom plug-ins, specify the custom plug-in name for example, hana, mysql. Specify 'all' to generate report for "All Plug-ins".

true

true (ByPropertyName)

ScheduleType

Specify the schedule type. Valid values are 'daily', 'weekly', and 'monthly'.

true

true (ByPropertyName)

DayOfTheWeek

Specify the day of the week to run the schedule. Valid values are 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'. This field is applicable only for weekly schedule.

false

true (ByPropertyName)

DayOfTheMonth

Specify the day (number) of the month to run the schedule. The value should be between 0 and 28. Enter zero to run the schedule for the last day of the month. This field is applicable only for monthly schedule.

false

true (ByPropertyName)

TriggerTime

Specify the TriggerTime HH:MM in 24 Hours format.

true

true (ByPropertyName)

DocumentType

Specify the format of the report in which report should be sent over e-mail. The valid formats are PDF and CSV. Add the comma separator if both the formats are needed.

true

true (ByPropertyName)

FromEmail

Specify the e-mail address from which the report has to be sent.

false

true (ByPropertyName)

Recipients

Specify the e-mail address to send the report. For multiple e-mail ID's, seperate them by comma.

true

true (ByPropertyName)

Examples

Example 1: Creating a daily report schedule.

 Add-SmReportSchedule -Name schedule1 -Plugin SCO -ScheduleType daily  -TriggerTime 1:10 -DocumentType "PDF,CSV" -FromEmail user@domain.com -Recipients "user1@domain.com,user2@domain.com"

This example creates a daily schedule. Pass ScheduleType as 'Daily' and enter the TriggerTime at which the report needs to be generated every day. The report will contain data for the last 24 hours.

Example 2: Creating a weekly report schedule.

 Add-SmReportSchedule -Name schedule1 -Plugin hana -ScheduleType weekly -DayOfTheWeek sunday  -TriggerTime 1:10 -DocumentType PDF -FromEmail user@domain.com -Recipients "user1@domain.com,user2@domain.com"

This example creates a weekly schedule for the custom plug-in. Pass the ScheduleType as 'Weekly', enter DayOfTheWeek and TriggerTime at which the schedule should run every week. The report will contain data for the last 7 days. For the 'Plugin' parameter, the custom plug-in name is specified instead of the plug-in code.

Example 3: Creating a monthly report schedule.

 Add-SmReportSchedule -Name schedule1 -Plugin all -ScheduleType monthly -DayOfTheMonth 11  -TriggerTime 1:10 -DocumentType CSV -FromEmail user@domain.com -Recipients "user1@domain.com,user2@domain.com"

This example creates a monthly schedule. Pass ScheduleType as 'Monthly', enter DayOfTheMonth and TriggerTime to generate the report. If day of the month is selected as '06', the report will contain data from the last month 6th day to 6th day of the current month. If the day of the month is selected as 'Last Day', report will run on the last day of every month at the specified time. For 'Last Day', report will contain data from 1st of every month to the last day of the month.