Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Job - addMonthlyScheduleWithSNMPNotificationAndPriority

Job - addMonthlyScheduleWithSNMPNotificationAndPriority

Description :

This command adds a monthly schedule with specified priority to a job and, depending on the resulting status of the job run, issues an SNMP notification. Monthly schedule with SNMP notification is not supported if approval is enabled for the job type.

The argument jobKey is a handle to the job being modified. To find the jobKey for a specific job type, use the SnapshotJob getDBKeyByGroupAndName command.

The dateString argument defines a monthly schedule to be added. It must be in the format YYYY-MM-DD HH:MM:SS. Use the DayOfMonth argument to specify the day when the job executes.

The recipient argument identifies the SNMP listener. The statusType argument determines the statuses for which you want to issue a notification. The possible statuses each have a value as follows:

  • Success=2
  • Failure=4
  • Cancel=8

For statusType, add the statuses for which you want to issue notifications. For example, if you want to issue notifications when the job status is Failure or Cancel, then statusType=12.

Set priorityString to one of the following priorities:

  • CRITICAL
  • HIGH
  • NORMAL
  • LOW
  • LOWEST

Return type : java.lang.Object

Command Input :

Variable Name

Variable Type

Description

jobKey

com.bladelogic.om.infra.model.base.keys.SJobKey

Handle to the job.

dateString

String

Monthly schedule to be added. The date string must be in the format YYYY-MM-DD HH:MM:SS.

dayOfMonth

Integer

Calendar day of the month to execute the job.

recipient

String

SNMP listener.

statusType

Integer

Sum of all statuses for which you want to issue notifications. See above for a more complete description.

priorityString

String

Priority of monthly schedule to be added.

Example

The following example shows how to add a monthly run with high priority to a job. The job runs at 11:35 PM on the 25th day of the month. An SNMP trap will be generated on success, failure, or cancel.

Script





RECIPIENT="snmplistener.anundisclosedcompany.com" 

NOTIFICATION_STATUS=14 

DATE_STRING="2005-01-01 23:35:00" 

DAY_OF_MONTH=25 

PRIORITY_STRING=HIGH 

JOB_KEY=`blcli SnapshotJob getDBKeyByGroupAndName /snapshots snapconfig` 

JOB_KEY=`blcli Job addMonthlyScheduleWithSNMPNotificationAndPriority $JOB_KEY "$DATE_STRING" $DAY_OF_MONTH $RECIPIENT $NOTIFICATION_STATUS $PRIORITY_STRING` 



Was this page helpful? Yes No Submitting... Thank you

Comments