Job - addMonthlySchedule

Job - addMonthlySchedule

Description :

This command adds a monthly schedule to a job. This command is not supported if the 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 to the job definition. It must be in the format YYYY-MM-DD HH:MM:SS. Use the dayOfMonth argument to specify the day when the job executes.

This command does not send a job notification. To add a schedule that includes notifications, see the Job addMonthlyScheduleWithSNMPNotification or Job addMonthlyScheduleWithEMailNotification commands.

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.

Example

The following example shows how to add a monthly run to a job. The job runs at 11:35 PM on the 25th day of the month.

Script





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

DAY_OF_MONTH=25 

JOB_KEY=`blcli SnapshotJob getDBKeyByGroupAndName /snapshots snapconfig` 

JOB_KEY=`blcli Job addMonthlySchedule $JOB_KEY "$DATE_STRING" $DAY_OF_MONTH` 



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

Comments