Back to Documentation Overview
campaignSchedule
public static campaignSchedule(string apikey, string cid, string schedule_time, string schedule_time_b)
Schedule a campaign to be sent in the future
- Section:
- Campaign Related
- Parameters:
apikey a valid API Key for your user account. Get by calling login() cid the id of the campaign to schedule schedule_time the time to schedule the campaign. For A/B Split "schedule" campaigns, the time for Group A - in YYYY-MM-DD HH:II:SS format in GMT schedule_time_b optional - the time to schedule Group B of an A/B Split "schedule" campaign - in YYYY-MM-DD HH:II:SS format in GMT - Returns:
- boolean - true on success
- <?php
- /**
- This Example shows how to schedule a campaign for future delivery
- via the MCAPI class.
- **/
- require_once 'inc/MCAPI.class.php';
- require_once 'inc/config.inc.php'; //contains apikey
- $schedule_for = '2018-04-01 09:05:21';
- $retval = $api->campaignSchedule($campaignId, $schedule_for);
- if ($api->errorCode){
- } else {
- }
- <?php
- /**
- This Example shows how to Schedule a Campaign to be sent at a specified time in the
- future using the XML-RPC service and do some basic error checking.
- Note that we are using the PEAR XML-RPC client and recommend others do as well.
- **/
- require_once 'XML/RPC2/Client.php';
- require_once 'inc/config.inc.php';
- try {
- // note that the Schedule date MUST be formatted like this:
- // '2008-04-01 09:05:21' means 'April 1st, 2008'
- $schedule_for = '2018-04-01 09:05:21';
- $result = $client->campaignSchedule($apikey, $campaignId, $schedule_for);
- } catch (XML_RPC2_FaultException $e){
- }
- ?>
Examples (2)
download example code[1] mcapi_campaignSchedule.php
[2] xml-rpc_campaignSchedule.php
|
Add New Note
User Contributed Notes for
campaignSchedule |
|---|
| No notes, yet... Will you be the first?? |