You are here

function simplenews_cron in Simplenews 7

Same name and namespace in other branches
  1. 8.2 simplenews.module \simplenews_cron()
  2. 8 simplenews.module \simplenews_cron()
  3. 5 simplenews.module \simplenews_cron()
  4. 6.2 simplenews.module \simplenews_cron()
  5. 6 simplenews.module \simplenews_cron()
  6. 7.2 simplenews.module \simplenews_cron()
  7. 3.x simplenews.module \simplenews_cron()

Implements hook_cron().

4 calls to simplenews_cron()
SimpleNewsI18nTestCase::testContentTranslation in tests/simplenews.test
SimplenewsSendTestCase::testDelete in tests/simplenews.test
Create a newsletter, send mails and then delete.
SimplenewsSendTestCase::testSendNowCron in tests/simplenews.test
Send a newsletter without using cron.
SimplenewsSendTestCase::testSendNowCronThrottle in tests/simplenews.test
Send a newsletter using cron and a low throttle.

File

./simplenews.module, line 811
Simplenews node handling, sent email, newsletter block and general hooks

Code

function simplenews_cron() {
  module_load_include('inc', 'simplenews', 'includes/simplenews.mail');
  simplenews_mail_spool(variable_get('simplenews_throttle', 20));
  simplenews_clear_spool();

  // Update sent status for newsletter admin panel.
  simplenews_send_status_update();
}