scheduled_announcement.php 506 B

1234567891011121314
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. require_once __DIR__.'/../inc/global.inc.php';
  4. $urlList = UrlManager::get_url_data();
  5. foreach ($urlList as $url) {
  6. // Set access_url to set correct paths.
  7. $_configuration['access_url'] = $url['id'];
  8. echo "Portal: # ".$url['id']." - ".$url['url'].'-'.api_get_path(WEB_CODE_PATH).PHP_EOL;
  9. $object = new ScheduledAnnouncement();
  10. $messagesSent = $object->sendPendingMessages($url['id']);
  11. echo "Messages sent $messagesSent".PHP_EOL;
  12. }