# Cannot schedule emails (cron job problem?)

**URL:** <https://forum.mautic.org/t/cannot-schedule-emails-cron-job-problem/18152>\
**Category:** Product Support\
**Created:** [February 13, 2021, 11:01pm UTC](https://forum.mautic.org/t/cannot-schedule-emails-cron-job-problem/18152 "2021-02-13T23:01:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![podgeman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/podgeman/32/1272_2.png) [@podgeman](https://forum.mautic.org/u/podgeman)\
**Post date:** [February 13, 2021, 11:01pm UTC](https://forum.mautic.org/t/cannot-schedule-emails-cron-job-problem/18152/1 "2021-02-13T23:01:15Z")

</div>

**Your software**  
My Mautic version is: 3.1.25  
My PHP version is: 7.3.27.  
My Database type and version is: MariaDB 10.5

**Your problem**  
My problem is:

I cannot seem to schedule sending mail although I can send mail immediately.  
I create a new email, set it to published, and select the future time.  
The mail appears with an orange clock displaying the date and time to be sent. But it is never sent. If I leave the “Channels | Emails” page then return, the clock has vanished but it says “Pending” so has not been sent.  
I assume the problem is cron-job related. On my VPS my cron-jobs are:

- 
  - 
    - 
      - 
        - php /var/www/html mautic:segments:update

- 
  - 
    - 
      - 
        - php /var/www/html mautic:campaigns:update

- 
  - 
    - 
      - 
        - php /var/www/html mautic:campaigns:trigger

- 
  - 
    - 
      - 
        - php /var/www/html mautic:campaigns:execute

- 
  - 
    - 
      - 
        - php /var/www/html mautic:iplookup:download

- 
  - 
    - 
      - 
        - php /var/www/html mautic:emails:send

- 
  - 
    - 
      - 
        - php /var/www/html mautic:broadcasts:send

I added a number of these cron-jobs from posts in the forum. Nonetheless, I have never been able to get scheduling to work. My syslogd file seems to show that the cron jobs are executed every minute.

Can someone please advise me.

These errors are showing in the log:  
Where, exactly, is the log file? There is nothing in /var/log/

Steps I have tried to fix the problem:

Adding cron-jobs based on this forum.

---

<div class="post-metadata">

**Author:** ![dimitri](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dimitri/32/4437_2.png) [@dimitri](https://forum.mautic.org/u/dimitri)\
**Post date:** [February 14, 2021, 10:46pm UTC](https://forum.mautic.org/t/cannot-schedule-emails-cron-job-problem/18152/2 "2021-02-14T22:46:19Z")

</div>

Next time when you post code, select the code and press the “preformatted text icon” in the editor. That way your code (crontab) will be better readable…

-Did you configure Queue settings? Config → Email settings, How should email be handled, message limit etc?

-I remember I had problems in the past with different versions of PHP. The version the CLI uses can be different than what the webserver uses. You can see what the crontab uses when you type `php -v` in the shell.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [February 15, 2021, 4:03pm UTC](https://forum.mautic.org/t/cannot-schedule-emails-cron-job-problem/18152/3 "2021-02-15T16:03:46Z")

</div>

Hi, this is wrong:

> [@podgeman](#):
>
> php /var/www/html mautic:broadcasts:send

`* * * * * php /var/www/html/bin/console mautic:broadcasts:send`

if you installed mautic in the mautic subdir, than you need that as well:

`* * * * * php /var/www/html/mautic/bin/console mautic:broadcasts:send`

But don’t run every minute, try to optimize them:

> **[Ultimate guide to Mautic cronjobs – Joey Keller](https://joeykeller.com/ultimate-guide-to-mautic-cronjobs/)**
