Create cron task

				
					StructOperationResponse WebHostingCronTaskCreate(string $IDsession, string $id, string $fqdn, string $path, string $returnMethod, string $returnTarget, string $mm, string $hh, string $jj, string $mmm, string $jjj)
				
			

Create a cron task.

REQUIRED

  • idSession string (32)
    Session ID.
  • id string
    Hosting ID.
  • fqdn string
    fqdn of the vhost.
  • path string
    Path of the script to be executed, starting from the vhost’s directory.
  • returnMethod string
    Logging method (“LOG”, “MAIL” or “NONE”).
  • returnTarget string
    Target of the log.

    When returnMethod is “LOG”: a path of a log file starting from the vhost’s directory.

    When returnMethod is “MAIL”: an email address.

  • mm string
    Minutes (00-59).
  • hh string
    Hours (00-23).
  • jj string
    Day (01-31).
  • mmm string
    Month (01-12).
  • jjj string
    Day in the week (1-7).

An Object of type StructOperationResponse

<?php 
$clientSOAP = new SoapClient("http://URL.wsdl");
 
try 
{
 
    $idSession = $clientSOAP->sessionOpen("XXXX", "XXXX", "EN"); 
    $clientSOAP->WebHostingCronTaskCreate($idSession, "NW1024", "wordpress.netim.com", "/cron.php", "LOG", "/log.txt", "5", "*", "*", "*", "*"); 
}
catch(SoapFault $fault) 
{
    echo "Exception : " .$fault->getMessage(). "\n"; 
}
 
if (isset($idSession)) 
{
    $clientSOAP->sessionClose($idSession); 
}