How can I create a content type in a custom module? I would like to create a content type called announcements for a module that I'm creating, but haven't found much to make this work. I tried this:

    function srl_dash_install() {
    //drupal_install_schema('srl_contactics_monthly_apps');
    $t = get_t(); // runs in both the installer and runtime

  /* Create and save a new content object */
  $announcement = 'announcement'; // machine name of the content type

  // define the node type
  $announcements = array(
    'type' =&gt; $announcement,
    'name' =&gt; $t('Announcement'),// Display name of the content type
    'base' =&gt; 'node_content',
    'announcement' =&gt; $t('Announcement'),
    'description' =&gt; $t('Add Contactics Announcements.'),
    'custom' =&gt; TRUE,
  );

  // set other node defaults not declared above
  $content_type = node_type_set_defaults($announcements);

  // add the body field
  node_add_body_field($content_type, $t('Body'));

  // save the content type
  node_type_save($content_type);
}


but I'm not sure how to make this hook run.

Any help would be appreciated.
That hook is only run when the module is installed, maybe you added the hook during development of your module and when it was enabled?

The hook should be placed in a file called srl_dash.install.

Then disable your module and uninstall it, then enable it again. Now the hook will run.