Skip to content

Instantly share code, notes, and snippets.

@rscotton
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rscotton/ef1113d5a9d818aa1e96 to your computer and use it in GitHub Desktop.
Save rscotton/ef1113d5a9d818aa1e96 to your computer and use it in GitHub Desktop.
Now, for Drupal's hook_cron(), which ties everything together.
<?php
function profile_cron() {
//Use the DrupalQueue item keys you defined above to set up your two DrupalQueue items
$import_item = DrupalQueue::get('import_profiles');
$status_sync_item = DrupalQueue::get('active_status_sync');
//Add DrupalQueue items to the queue
$import_item->createItem(array());
$status_sync_item->createItem(array());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment