Using hook_form_alter() and hook_cron() together I am interested in adding a function to the cron queue after I submit a form. I am confused how to call the cron after the form submits.

I am using hook_form_alter for catching the submit:

function rating_form_alter(&amp;$form, $form_state, $form_id) {
    switch ($form_id)  {
        case 'comment_node_form':
            $form['#submit'][] = 'add_rating_queue_function';
            break;
     }  
}

function add_rating_queue_function($form, &amp;$form_state) {
    ....
}


my hook_cron_queue_info:

function add_rating_cron_queue_info(){
  $queues['update_rating'] = array(
    'worker callback' =&gt; 'add_rating_queue_function',
    'time' =&gt; 120,
  );
  return $queues;
}


I am a little confused on how to call hook_cron or hook_cron_queue_info to add my add_rating_queue_function to the cron.

Can I just call $form['#submit'][] = 'add_rating_cron_queue_info'; inside my hook_form_alter
You don't invoke hook_cron_queue_info(); you add an item to your cron queue, which is nothing else that a normal Drupal queue that is exposed to Drupal cron through hook_cron_queue_info().

What you should do in your add_rating_queue_function() is using code similar to the following one.

$queue = DrupalQueue::get('update_rating');
// Add a new item to the queue.
$queue-&gt;createItem($data);


$data is the data that is passed to the worker callback you define for the update_rating queue in add_rating_cron_queue_info().

As for running the Drupal cron tasks, you can simply call drupal_run_cron(). This is what system_run_cron_submit() does.

function system_run_cron_submit($form, &amp;$form_state) {
  // Run cron manually from Cron form.
  if (drupal_cron_run()) {
    drupal_set_message(t('Cron run successfully.'));
  }
  else {
    drupal_set_message(t('Cron run failed.'), 'error');
  }

  drupal_goto('admin/config/system/cron');
}


system_run_cron_submit() is the submission callback for the "Run cron" button you find at admin/config/system/cron. 

In your case, you simply need to call drupal_run_cron() without checking the error code.

As Jeremy French said, drupal_run_cron() should not be called too often, and in this way. In admin/config/system/cron, the function call is triggered by the user, but a module should not be calling drupal_run_cron(), especially because Drupal 7 includes the code from Poormanscron. This mean that cron tasks could be already executed during page requests; adding a further call to drupal_run_cron() could make the site slower. A better code could be the following one.

if (lock_acquire('cron', 2.0)) {
  $last_cron_execution = variable_get('cron_last', 0);
  lock_release('cron');

  // Check cron tasks were not already executed, or they were not executed few minutes ago.
  // Set $execute if they were executed far enough.

  if ($execute) {
    drupal_run_cron();
  }
}