Date Module / Date Repeat: Hourly or Minutely Recurrence?
Recurring events are handled in good old unix cron, see (http://drupal.org/cron). But there is a more, Php way .. Poor Man's Cron, see http://drupal.org/project/poormanscron (in D6, part of core in D7).

Basically, since some hosts didn't allow cron jobs Poor Man's Cron simply "hooked" a bit of code into each page using Ajax. If an amount of time had past it would run cron.php (which in turn calls drupal_run_cron()).

Either way ... you need to put your task into the cron queue, make sure your site is set up correctly and let the core system execute it. If your going to use a custom module see 

http://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_cron_queue_info/7