You are here

function sf_import_cron in Salesforce Suite 7.2

Same name and namespace in other branches
  1. 6.2 sf_import/sf_import.module \sf_import_cron()

Implements hook_cron().

File

sf_import/sf_import.module, line 59

Code

function sf_import_cron() {
  if ($sf = salesforce_api_connect()) {

    // Get new records from Salesforce since last time cron was run
    if (variable_get('sf_import_cron_import', TRUE)) {

      // NOTE: gets to here.
      sf_import_import_records();
    }

    // Process the records (insert/update records)
    if (variable_get('sf_import_cron_process', TRUE)) {
      _sf_import_process_records();
    }
  }
}