# CMS_IsPackageScheduleEnabled

> Checks if a given package has an active schedule.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/cms-functions/cms-ispackagescheduleenabled/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

#### Description

Checks if a given package has an active schedule

### Syntax

**VBScript**

```vb
CMS_IsPackageScheduleEnabled(sPackage, sVersion) As Boolean
```

**PowerShell**

```powershell
[bool] CMS_IsPackageScheduleEnabled -package <string> -version <string>
```

### Properties

#### sPackage (String)

Name of the package

#### sVersion (String)

Version of the package

### Return value

**VBScript**

Boolean, TRUE if function completed successfully. The result will be stored in gbValue. If the package is not found function will return false

**PowerShell**

Boolean, $true if the package has a schedule and it is enabled. Otherwise $false

### Example

**VBScript**

```vb
If bStatus Then xStatus = CMS_IsPackageScheduleEnabled("CapaInstaller", "v1.0")
If bStatus Then
  xStatus = Job_WriteLog("Custom","gbValue: " & gbValue, bStatus, True)
End If
```

**PowerShell**

```powershell
if (CMS_IsPackageScheduleEnabled "CapaInstaller"  "v1.0") {
  $cs.Job_WriteLog("Enabled","Package (CapaInstaller) has an enabled schedule")
}
```

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/) [Business Unit support](/capainstaller/vb-scripting-library/addendum/business-unit-support/)
