You are here

function salesforce_cron in Salesforce Suite 5

Implementation of hook_cron().

File

./salesforce.module, line 161
Original Creator, Maintainer & Developer: Steve McKenzie (http://drupal.org/user/45890) Drupal and Salesforce.com (mainly only working with contacts / leads but can be extended to do anything the salesforce API version 6 can do) Current…

Code

function salesforce_cron() {
  $result = db_query("SELECT sid, type, type_id, message, timestamp, status FROM {salesforce_log} WHERE status = 1 ORDER BY timestamp DESC");
  if (db_num_rows($result) > 0) {
    while ($row = db_fetch_object($result)) {
      _salesforce_cron_run($row);
    }
  }
}