# Send scheduled broadcasts not working

**URL:** https://forum.mautic.org/t/send-scheduled-broadcasts-not-working/34675
**Category:** Product Support
**Created:** [January 7, 2025, 10:27pm UTC](https://forum.mautic.org/t/send-scheduled-broadcasts-not-working/34675 "2025-01-07T22:27:35Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Tautvydas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tautvydas/32/13494_2.png) [@Tautvydas](https://forum.mautic.org/u/Tautvydas)
#### Post date: [January 7, 2025, 10:27pm UTC](https://forum.mautic.org/t/send-scheduled-broadcasts-not-working/34675/1 "2025-01-07T22:27:35Z")

</div>

**Your software**  
My Mautic version is: 5.2.1  
My PHP version is: PHP/8.1.31  
My Database type and version is: mysql:9.1.0

**Your problem**  
I am trying to send a segment email following the [Send Scheduled Broadcasts (Segment Emails) Cron Job](https://forum.mautic.org/t/sending-in-progress-does-not-actually-progress/15396) documentation, but I am unable to do so.  
My Cron Job executes, but it throws a `Symfony\Component\Messenger\Exception\TransportException`

My mautic cron file:

SHELL=/bin/bash  
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin  
BASH\_ENV=/tmp/cron.env

- 
  - 
    - 
      - 
        - php /var/www/html/bin/console mautic:segments:update 2\>&1 | tee /tmp/stdout

- 
  - 
    - 
      - 
        - php /var/www/html/bin/console mautic:campaigns:update 2\>&1 | tee /tmp/stdout

- 
  - 
    - 
      - 
        - php /var/www/html/bin/console mautic:campaigns:trigger 2\>&1 | tee /tmp/stdout

- 
  - 
    - 
      - 
        - php /var/www/html/bin/console mautic:broadcasts:send --limit=200 2\>&1 | tee /tmp/stdout

These errors are showing in the log:

```auto
[2025-01-07T22:10:03.252284+00:00] mautic.ERROR: Symfony\Component\Messenger\Exception\TransportException: Could not connect to the AMQP server. Please verify the provided DSN. (uncaught exception) at /var/www/html/vendor/symfony/amqp-messenger/Transport/AmqpSender.php line 77 while running console command `mautic:broadcasts:send` [stack trace] #0 /var/www/html/vendor/symfony/amqp-messenger/Transport/AmqpTransport.php(75): Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpSender->send(Object(Symfony\Component\Messenger\Envelope)) #1 /var/www/html/vendor/symfony/messenger/Middleware/SendMessageMiddleware.php(68): Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpTransport->send(Object(Symfony\Component\Messenger\Envelope)) #2 /var/www/html/vendor/symfony/messenger/Middleware/FailedMessageProcessingMiddleware.php(34): Symfony\Component\Messenger\Middleware\SendMessageMiddleware->handle(Object(Symfony\Component\Messenger\Envelope), Object(Symfony\Component\Messenger\Middleware\StackMiddleware)) #3 /var/www/html/vendor/symfony/messenger/Middleware/DispatchAfterCurrentBusMiddleware.php(68): Symfony\Component\Messenger\Middleware\FailedMessageProcessingMiddleware->handle(Object(Symfony\Component\Messenger\Envelope), Object(Symfony\Component\Messenger\Middleware\StackMiddleware)) #4 /var/www/html/vendor/symfony/messenger/Middleware/RejectRedeliveredMessageMiddleware.php(48): Symfony\Component\Messenger\Middleware\DispatchAfterCurrentBusMiddleware->handle(Object(Symfony\Component\Messenger\Envelope), Object(Symfony\Component\Messenger\Middleware\StackMiddleware)) #5 /var/www/html/vendor/symfony/messenger/Middleware/AddBusNameStampMiddleware.php(37): Symfony\Component\Messenger\Middleware\RejectRedeliveredMessageMiddleware->handle(Object(Symfony\Component\Messenger\Envelope), Object(Symfony\Component\Messenger\Middleware\StackMiddleware)) #6 /var/www/html/vendor/symfony/messenger/MessageBus.php(77): Symfony\Component\Messenger\Middleware\AddBusNameStampMiddleware->handle(Object(Symfony\Component\Messenger\Envelope), Object(Symfony\Component\Messenger\Middleware\StackMiddleware)) #7 /var/www/html/vendor/symfony/mailer/Mailer.php(63): Symfony\Component\Messenger\MessageBus->dispatch(Object(Symfony\Component\Mailer\Messenger\SendEmailMessage)) #8 /var/www/html/docroot/app/bundles/EmailBundle/Helper/MailHelper.php(390): Symfony\Component\Mailer\Mailer->send(Object(Mautic\EmailBundle\Mailer\Message\MauticMessage)) #9 /var/www/html/docroot/app/bundles/EmailBundle/Helper/MailHelper.php(469): Mautic\EmailBundle\Helper\MailHelper->send(false) #10 /var/www/html/docroot/app/bundles/EmailBundle/Model/SendEmailToContact.php(379): Mautic\EmailBundle\Helper\MailHelper->queue(false, 'RETURN_ERRORS') #11 /var/www/html/docroot/app/bundles/EmailBundle/Model/SendEmailToContact.php(190): Mautic\EmailBundle\Model\SendEmailToContact->sendStandardEmail() #12 /var/www/html/docroot/app/bundles/EmailBundle/Model/EmailModel.php(1450): Mautic\EmailBundle\Model\SendEmailToContact->send() #13 /var/www/html/docroot/app/bundles/EmailBundle/Model/EmailModel.php(1083): Mautic\EmailBundle\Model\EmailModel->sendEmail(Object(Mautic\EmailBundle\Entity\Email), Array, Array) #14 /var/www/html/docroot/app/bundles/EmailBundle/EventListener/BroadcastSubscriber.php(48): Mautic\EmailBundle\Model\EmailModel->sendEmailToLists(Object(Mautic\EmailBundle\Entity\Email), Object(Doctrine\ORM\PersistentCollection), 199, 50, Object(Symfony\Component\Console\Output\ConsoleOutput), NULL, NULL, NULL, NULL) #15 /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php(270): Mautic\EmailBundle\EventListener\BroadcastSubscriber->onBroadcast(Object(Mautic\ChannelBundle\Event\ChannelBroadcastEvent), 'mautic.channel_...', Object(Symfony\Component\EventDispatcher\EventDispatcher)) #16 /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php(230): Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}(Object(Mautic\ChannelBundle\Event\ChannelBroadcastEvent), 'mautic.channel_...', Object(Symfony\Component\EventDispatcher\EventDispatcher)) #17 /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'mautic.channel_...', Object(Mautic\ChannelBundle\Event\ChannelBroadcastEvent)) #18 /var/www/html/docroot/app/bundles/ChannelBundle/Command/SendChannelBroadcastCommand.php(134): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(Mautic\ChannelBundle\Event\ChannelBroadcastEvent), 'mautic.channel_...') #19 /var/www/html/vendor/symfony/console/Command/Command.php(298): Mautic\ChannelBundle\Command\SendChannelBroadcastCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #20 /var/www/html/vendor/symfony/console/Application.php(1058): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #21 /var/www/html/vendor/symfony/framework-bundle/Console/Application.php(96): Symfony\Component\Console\Application->doRunCommand(Object(Mautic\ChannelBundle\Command\SendChannelBroadcastCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #22 /var/www/html/vendor/symfony/console/Application.php(301): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand(Object(Mautic\ChannelBundle\Command\SendChannelBroadcastCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #23 /var/www/html/vendor/symfony/framework-bundle/Console/Application.php(82): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #24 /var/www/html/vendor/symfony/console/Application.php(171): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #25 /var/www/html/bin/console(16): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #26 {main} [] {"hostname":"24beb606f935","pid":111}
[2025-01-07T22:10:03.259208+00:00] mautic.WARNING: Command `mautic:broadcasts:send` exited with status code 1 [] {"hostname":"24beb606f935","pid":111}

```

---

<div class="post-metadata">

### Author: ![Tautvydas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tautvydas/32/13494_2.png) [@Tautvydas](https://forum.mautic.org/u/Tautvydas)
#### Post date: [January 8, 2025, 8:22am UTC](https://forum.mautic.org/t/send-scheduled-broadcasts-not-working/34675/2 "2025-01-08T08:22:05Z")

</div>

If someone has the same issue, make sure to load the environment variables correctly inside the cron file (e.g., `/tmp/cron.env`) or directly in `/opt/mautic/cron/mautic`. In my case, the problem was caused by missing AMQP server environment properties.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)
#### Post date: [January 9, 2025, 8:22pm UTC](https://forum.mautic.org/t/send-scheduled-broadcasts-not-working/34675/3 "2025-01-09T20:22:51Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
