Skip to main content

AddSchedule (v1,v2)

July 21, 2025

This API creates a new backup schedule setting on a backup set.

The settings can be found on the AhsayCBS web console at:

  • Backup / Restore > Users, Groups & Policies > Backup User > %User Name% > Backup Set > %Backup Set Name% > Backup Schedule

v1 AddSchedule.do


URL

https://CBS.EXAMPLE.COM/obs/api/json/AddSchedule.do

Deprecated Since Version: 7.15.6.38

v2 AddSchedule.do


URL

https://CBS.EXAMPLE.COM/obs/api/json/2/AddSchedule.do

Available Since Version: 9.1

Parameters

Key Type Description
SysUser String Username of an AhsayCBS System User with Admin or API role.
SysPwd String Password matching SysUser.
LoginName String Username of the backup user.
BackupSetID String ID of the backup set. Obtainable in ListBackupSets API.
Name String Name of the schedule.
Type String Type of schedule, can be one of the following: DAILY, WEEKLY, MONTHLY or CUSTOM.
BackupInterval Integer For periodic schedule, the value can be "1" or one of the following: 1, 2, 3, 4, 5, 10, 12, 15, 20, 30, 60, 120, 240, 360,480 or 720. ("-1" means periodic schedule is disabled, that it is a normal schedule)
Time TimeBean Object Mandatory if "BackupInterval" < ().
FullBackup Boolean Must be true when "BackupInterval" > (). If it is true, the schedule backup will run until full backup is completed. Otherwise, it will stop after the duration specified in key "Duration" of the TimeBean in key "Time".
SpaceFreeUpEnabled Boolean Remove obsolete files according to retention policy from backup destination according to retention policy.
SkipBackupEnabled Boolean True / False
BackupType String

It must be empty for File, MySQL, MariaDB, Lotus Notes, System State, MS Windows Server 2008, MS Exchange Mail Level Backup, Cloud File, and Microsoft 365 Exchange Online backup sets.

For the following Backup Types, this parameter must be filled with one of the following:

MS Exchange Server (if VSS supported): DATABASE, LOG, COPY or DIFFERENTIAL.

If not VSS supported: DATABASE or LOG.

Oracle Database Server Backup and Lotus Domino: DATABASE or LOG.

MS SQL Server Backup: DATABASE, DIFFERENTIAL or LOG.

ShadowProtect System Backup: COMPLETE, DIFFERENTIAL or INCREMENTAL.

MS Hyper-V Backup: INCREMENTAL or DATABASE.

VMware Backup:

VMware ESXi 5.5 / 6 / 6.5 / 6.7 / 7.0 / 8.0 or VMware vCenter 5.5 / 6 / 6.5 / 6.7 / 7.0 / 8.0: DATABASE or INCREMENTAL.

VMware Player 6 / 7 or VMware Workstation Player 12 / 14 / 15 / 16: SKIP or POWEROFF.

VMware Workstation 10 / 11, VMware Workstation Pro 12 / 14 / 15 / 16 or VMware Fusion 6 / 7 / 8 / 10 / 11 / 12: leave blank

WeekSchedule WeekSchedule Mandatory for weekly schedule.
MonthSchedule MonthSchedule Mandatory for monthly schedule.
CustomSchedule CustomSchedule Mandatory for custom schedule.
MonthlyDateType String Mandatory for monthly schedule. The value can be either be DATE or CRITERIA.
Period String (optional) The value can be either be AM or PM. If the parameter "Period" is specified as AM or PM then the parameter "Hour" is in 12-hour format. "1", "2" ..."12" can be set. If the parameter "Period" is not specified,, then the parameter "Hour" will default to 24-hour format. "0", "1"..."23" can be set.
Return Values
Key Type Description
Status String "OK" or "Error"
Message String Error message, it only appears if status displays "Error".
ExptType String The type of exception, it appears only if status is "Error".
JSON Objects

TimeBean

Key Type Description
Hour Integer 00-23
Minute Integer 00-59
Duration Integer (optional) If no value is specified, default value=-1. The value can either be "until full backup completed=-1" or "stop backup after xx hours=1 to 24". Must be -1 when "BackupInterval" > ().
DurationMinute Integer (optional) If no value is specified, default value=-1. The value can be 0 -59, where either Duration or DurationMinute must be larger than 0 if Duration is not -1.

WeekSchedule

Key Type Description
Sun Boolean True / False
Mon Boolean True / False
Tue Boolean True / False
Wed Boolean True / False
Thu Boolean True / False
Fri Boolean True / False
Sat Boolean True / False

MonthSchedule

Key Type Description
Occurrence String The value can be one of the following: First, Second, Third, Fourth or Last.
Criteria String The value can be one of the following: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Weekday or Weekend.
Date Integer Complete date.

CustomSchedule

Key Type Description
Year Integer In yyyy format.
Month Integer In MM format.
Day Integer In dd format.
Examples

Example 1: Input Daily Schedule

INPUT

{
	"SysUser":"system",
	"SysPwd":"system1",
	"LoginName":"obm",
	"BackupSetID":"1687137085658",
	"Name":"DAILYTEST",
	"Type":"DAILY",
	"BackupInterval":5,
	"FullBackup":true,
	"SpaceFreeUpEnabled":false,
	"SkipBackupEnabled":false
}

OUTPUT

{
	"Status":"OK"
}

Example 2: Input Weekly Schedule

INPUT

{
	"SysUser":"system",
	"SysPwd":"system1",
	"LoginName":"obm",
	"BackupSetID":"1687137085658",
	"Name":"WEEKLYTEST",
	"Type":"WEEKLY",
	"BackupInterval":-1,
	"FullBackup":true,
	"Time":{
		"Hour":08,
		"Minute":00
	},
	"SpaceFreeUpEnabled":true,
	"SkipBackupEnabled":true,
	"WeekSchedule":{
		"Sun":true,
		"Mon":true,
		"Tue":true,
		"Wed":false,
		"Thu":false,
		"Fri":true,
		"Sat":true
	}
}

OUTPUT

{
	"Status":"OK"
}

Example 3: Input Incorrect Value for BackupInterval

INPUT

{
	"SysUser":"system",
	"SysPwd":"system1",
	"LoginName":"obm",
	"BackupSetID":"1687137085658",
	"Name":"DAILYTEST",
	"Type":"DAILY",
	"BackupInterval":9,
	"FullBackup":true,
	"SpaceFreeUpEnabled":false,
	"SkipBackupEnabled":false
}

OUTPUT

{
	"Status":"Error",
	"Message":"ScheduleSettings parameter BackupInterval only can be -1 OR one of the following value: [1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60, 120, 180,, 240, 480, 720]",
	"ExptType":"com.ahsay.obs.core.dbs.DbsException"
}