Campaign delivery is scheduled. Time is set according GMT, but if a specific time zone needs to be set up, required number of hours have to be added or subtracted. Time is written in YYYY-MM-DD HH:II:SS +GMT format. Example of time format: ‘2020-05-18 11:59:21 +0100’, where ‘+0100’ is an added hour to the standard time.
campaignSchedule(string $cid, string $schedule_time) : boolean
campaignSchedule($cid, $schedule_time); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load campaignSchedule()!\n"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "Campaign Scheduled to be delivered $schedule_time!\n"; }
new xmlrpcval($apikey), 'cid' => new xmlrpcval($campaignId), 'schedule_time' => new xmlrpcval($schedule_time) ), 'struct'); $f = new xmlrpcmsg('campaignSchedule', array($v)); $c = new xmlrpc_client($apiUrl["path"], $apiUrl['host'], 80); $c->setDebug($debug); $r = &$c->send($f); header("Content-Type: text/plain"); if (!$r->faultCode()) { $retval = php_xmlrpc_decode($r->value()); echo "Campaign Scheduled to be delivered $schedule_time!\n"; } else { echo "Unable to run campaignSchedule()!\n"; echo "\tCode=" . $r->faultCode() . "\n"; echo "\tMsg=" . $r->faultString() . "\n"; }
from lib.config import * #contains apikey from lib.MGAPI import MGAPI # This Example shows how to ping using the MGAPI.php class and do some basic error checking. api = MGAPI(apikey) cid = campaignId schedule_time = '2020-05-18 11:59:21' retval = api.campaignSchedule(cid, schedule_time) if api.errorCode: print "Unable to load campaignSchedule()!" print "\tCode=", api.errorCode print "\tMsg=", api.errorMessage else: print "Campaign Scheduled to be delivered %s!" % (schedule_time)