當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CRM_Core_BAO_ActionSchedule::processQueue方法代碼示例

本文整理匯總了PHP中CRM_Core_BAO_ActionSchedule::processQueue方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Core_BAO_ActionSchedule::processQueue方法的具體用法?PHP CRM_Core_BAO_ActionSchedule::processQueue怎麽用?PHP CRM_Core_BAO_ActionSchedule::processQueue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CRM_Core_BAO_ActionSchedule的用法示例。


在下文中一共展示了CRM_Core_BAO_ActionSchedule::processQueue方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: run

 public function run($now = NULL)
 {
     require_once 'CRM/Core/BAO/ActionSchedule.php';
     CRM_Core_BAO_ActionSchedule::processQueue($now);
 }
開發者ID:hguru,項目名稱:224Civi,代碼行數:5,代碼來源:action.cronjob.php

示例2: civicrm_api3_job_send_reminder

/**
 * Send the scheduled reminders for all contacts (either for activities or events)
 *
 * @param  array   	  $params (reference ) input parameters
 *                        now - the time to use, in YmdHis format
 *                            - makes testing a bit simpler since we can simulate past/future time
 *
 * @return boolean        true if success, else false
 * @static void
 * @access public
 *
 */
function civicrm_api3_job_send_reminder($params)
{
    require_once 'CRM/Core/BAO/ActionSchedule.php';
    $result = CRM_Core_BAO_ActionSchedule::processQueue(CRM_Utils_Array::value('now', $params));
    if ($result['is_error'] == 0) {
        return civicrm_api3_create_success();
    } else {
        return civicrm_api3_create_error($result['messages']);
    }
}
開發者ID:peteainsworth,項目名稱:civicrm-4.2.9-drupal,代碼行數:22,代碼來源:Job.php

示例3: civicrm_api3_job_send_reminder

/**
 * Send the scheduled reminders for all contacts (either for activities or events).
 *
 * @param array $params
 *   (reference ) input parameters.
 *                        now - the time to use, in YmdHis format
 *                            - makes testing a bit simpler since we can simulate past/future time
 *
 * @return array
 */
function civicrm_api3_job_send_reminder($params)
{
    //note that $params['rowCount' can be overridden by one of the preferred syntaxes ($options['limit'] = x
    //It's not clear whether than syntax can be passed in via the UI config - but this keeps the pre 4.4.4 behaviour
    // in that case (ie. makes it non-configurable via the UI). Another approach would be to set a default of 0
    // in the _spec function - but since that is a deprecated value it seems more contentious than this approach
    $params['rowCount'] = 0;
    $lock = Civi::lockManager()->acquire('worker.core.ActionSchedule');
    if (!$lock->isAcquired()) {
        return civicrm_api3_create_error('Could not acquire lock, another ActionSchedule process is running');
    }
    $result = CRM_Core_BAO_ActionSchedule::processQueue(CRM_Utils_Array::value('now', $params), $params);
    $lock->release();
    if ($result['is_error'] == 0) {
        return civicrm_api3_create_success();
    } else {
        return civicrm_api3_create_error($result['messages']);
    }
}
開發者ID:hyebahi,項目名稱:civicrm-core,代碼行數:29,代碼來源:Job.php

示例4: civicrm_api3_job_send_reminder

/**
 * Send the scheduled reminders for all contacts (either for activities or events)
 *
 * @param  array       $params (reference ) input parameters
 *                        now - the time to use, in YmdHis format
 *                            - makes testing a bit simpler since we can simulate past/future time
 *
 * @return boolean        true if success, else false
 * @static void
 * @access public
 *
 */
function civicrm_api3_job_send_reminder($params)
{
    $lock = new CRM_Core_Lock('civimail.job.EmailProcessor');
    if (!$lock->isAcquired()) {
        return civicrm_api3_create_error('Could not acquire lock, another EmailProcessor process is running');
    }
    $result = CRM_Core_BAO_ActionSchedule::processQueue(CRM_Utils_Array::value('now', $params), $params);
    $lock->release();
    if ($result['is_error'] == 0) {
        return civicrm_api3_create_success();
    } else {
        return civicrm_api3_create_error($result['messages']);
    }
}
開發者ID:archcidburnziso,項目名稱:civicrm-core,代碼行數:26,代碼來源:Job.php


注:本文中的CRM_Core_BAO_ActionSchedule::processQueue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。