package push-upgrade schedule

Schedule a package push upgrade.

Represents a push upgrade request for upgrading a package in one or many orgs from one version to another version.

To initiate a push upgrade for an unlocked or second-generation managed package, the Create and Update Second-Generation Packages user permission is required.

For second-generation managed packages, the push upgrade feature is available only for packages that have passed AppExchange security review. To enable push upgrades for your managed package, log a support case in the Salesforce Partner Community.

For unlocked packages, push upgrades are enabled by default.

Use the -–migrate-to-2GP flag to indicate you’re installing a converted second-generation managed package into an org that has the first-generation managed package version of that package installed.

Flag Name (Long)Flag Name (Short)Description
‑‑api‑versionN/AType: Value

Override the api version used for api requests made by this command
‑‑flags‑dirN/AType: Value

Import flag values from a directory.
‑‑jsonN/AType: Boolean

Format output as json.
‑‑migrate‑to‑2gpN/AType: Boolean

Upgrade from a first-generation managed package (1GP) to a second-generation managed package (2GP). Required when you’re pushing a 2GP package to orgs with the 1GP version installed.
‑‑org‑file‑fType: Value

Filename of the CSV file that contains the list of subscriber org IDs that need the package upgrade. Either –org-list or –org-file must be specified.

The file must contain one org per line. The org ID must be the only value in each row.

All listed orgs must have a package version installed in their org that is lower than the package version you specified for the –package flag.
‑‑org‑list‑lType: Value

Comma-separated list of subscriber org IDs that need the package upgrade. Either –org-list or –org-file must be specified.
‑‑package‑pType: Value
Required

ID (starts with 04t) of the package version that the package is being upgraded to. The package version must be an active, non-beta package version.
‑‑start‑time‑tType: Value

Date and time (UTC) when the push upgrade is processed. Set to the earliest time that you want Salesforce to attempt to start the upgrade.

Scheduled push upgrades begin as soon as resources are available on the Salesforce instance, which is either at or after the start time you specify. In certain scenarios, the push upgrade starts a few hours after the scheduled start time.

As a best practice, schedule push upgrades at off-peak hours like 1:00 AM Saturday.

If you don’t specify this flag, the push upgrade is scheduled to run as soon as resources are available on the Salesforce instance.
‑‑target‑dev‑hub‑vType: Value
Required

Username or alias of the Dev Hub org that owns the package.

Overrides the value of the target-dev-hub configuration variable, if set.

Schedule a push upgrade that initiates at a specified time:

Schedule a push upgrade that initiates as soon as possible:

Schedule a push migration from a 1GP package to a 2GP package: