Set cron task status

				
					StructOperationResponse WebHostingCronTaskUpdate(string $IDsession, string $id, string $action, array $params)
			

Enable or disable a cron task.

REQUIRED

  • idSession string (32)
    Session ID.
  • id string
    Hosting ID.
  • action string
    Set to “SetActive”.
  • params array
    {“idCronTask”: cron task ID,

    “value”: “true” / “false”}

An Object of type StructOperationResponse

<?php 
$clientSOAP = new SoapClient("http://URL.wsdl");
 
try 
{
    $params = array("idCronTask" =>"201",
         "value" => "true",
        );
 
    $idSession = $clientSOAP->sessionOpen("XX000", "xxxxxxxx"); 
    $clientSOAP->WebHostingCronTaskUpdate($idSession, "NW1024", "SetActive", $params)); 
}
catch(SoapFault $fault) 
{
    echo "Exception : " .$fault->getMessage(). "\n"; 
}
 
if (isset($idSession)) 
{
    $clientSOAP->sessionClose($idSession); 
}