Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function sets cPanel & WHM's update frequency.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/set_cpanel_updates?updates=manual
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/set_cpanel_updates?updates=manual
 Command Line
whmapi0 set_cpanel_updates updates=manual

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 0 documentation or run the whmapi0 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
  "statusmsg": "Cpanel update frequency set to daily",
  "status": 1,
  "updates": "daily"
}
 Output (XML)
<set_cpanel_updates>
    <status>1</status>
    <statusmsg>Cpanel update frequency set to manual</statusmsg>
    <updates>manual</updates>
</set_cpanel_updates>

Parameters

ParameterTypeDescriptionPossible valuesExample
updatesstring

Required

The frequency with which to run cPanel & WHM updates on a server.

  • daily — Run updates daily.

  • manual — Run updates manually.
  • never — Never run updates.
daily

 

Returns

ReturnTypeDescriptionPossible valuesExample
updatesstringThe new frequency of server updates.
  • daily — Run updates daily.

  • manual — Run updates manually.
  • never — Never run updates.
daily

status

BooleanWhether the system successfully called the function.
  • 1 — Success.
  • 0 — Failure.

 

1
statusmsgstringThe result of the function.
  • Cpanel update frequency set to daily
  • An error message.
Cpanel update frequency set to daily