Set cron task settings

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

Update a cron task.

REQUIRED

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

    “path”: Path to the cron script,

    “returnMethod”: “LOG” / “MAIL” / “NONE,

    “returnTarget”:
    When returnMethod is “LOG” then a path of a log file starting from the vhost’s directory;
    When returnMethod is “MAIL” then an email address,

    “mm”: Minutes (00-59) ,

    “hh”: Hours (00-23),

    “jj”: Day (01-31),

    “mmm”: Month (01-12),

    “jjj”: Day in the week (1-7)}

An Object of type StructOperationResponse

<?php 
$clientSOAP = new SoapClient("http://URL.wsdl");
 
try 
{
    $params = array("idCronTask" =>"201",
         "path" => "/cron.php",
         "returnMethod" => "LOG",
         "returnTarget" => "/log.txt",
         "mm" => "5",
         "hh" => "*",
         "jj" => "*",
         "mmm" => "*",
         "jjj" => "*");
 
    $idSession = $clientSOAP->sessionOpen("XX000", "xxxxxxxx"); 
    $clientSOAP->WebHostingCronTaskUpdate($idSession, "NW1024", "SetValues", $params)); 
}
catch(SoapFault $fault) 
{
    echo "Exception : " .$fault->getMessage(). "\n"; 
}
 
if (isset($idSession)) 
{
    $clientSOAP->sessionClose($idSession); 
}