< All Topics

tool/delcron

Description

Deletes an existing cron job from a given SPanel account.

Parameters

FieldTypeRequiredDescription
tokenstringYesAuthorizing API token – check API Basics for more information.
accountuserstringYesThe SPanel user account that is being managed or viewed.
actionstringYesThe category and function being executed.
minutestringYesThe existing cron job’s minute parameter.
hourstringYesThe existing cron job’s hour parameter.
daystringYesThe existing cron job’s day parameter.
monthstringYesThe existing cron job’s month parameter.
weekdaystringYesThe existing cron job’s weekday parameter.
commandstringYesThe existing cron job’s command parameter.

Example

$endpointUrl = 'https://123.123.123.123/spanel/api.php';

$postData = [
  'token' => 'provided_auth_token',
  'accountuser' => 'spanelio',
  'action' => 'tool/delcron',
  'minute' => '*',
  'hour' => '*',
  'day' => '*',
  'month' => '*',
  'weekday' => '*',
  'command' => '/usr/bin/php -q /home/spanelio/public_html/cron.php'
];

$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $endpointUrl);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt( $ch, CURLOPT_POST, true);
curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query($postData));
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, false);
$jsonOutput = curl_exec( $ch );

You can find more information about the Endpoint URL in our API Basics article.

Output

{
    "result":"success",
    "data":{
        "msg":"The selected cron jobs have been removed successfully"
    }
}
Previous tool/editcron
Next tool/listssldomains
Table of Contents