Answers.Body: <p>Had the same problem, on Ubuntu change the system time zone with "sudo dpkg-reconfigure tzdata". Restart the mysql service with "sudo service mysql restart".</p>
  
  <p>Can confirm that this gets the cron running and processing the mailing.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-26T19:30:47.413Z
Answers.LastActivityDate: 2018-11-26T19:30:47.413Z
Answers.UserDisplayName: Stephen Sloan
Answers.Body: <p>I figured out that it was due to a time zone setting mismatch between MariaDB and PHP.  Taking inspiration in this forum post <a href="https://forum.civicrm.org/index.php%3Ftopic=26132.0.html" rel="nofollow noreferrer">https://forum.civicrm.org/index.php%3Ftopic=26132.0.html</a>, I observed that the time zone settings on the server were different than in the database.  My workaround was as follows:</p>
  
  <ol>
  <li>On Drupal, I disabled the option to allow users to select their own time zones and made sure that America/New York was selected</li>
  <li><p>On my server (I have CentOS 7 running) I selected the time zone</p>
  
  <pre><code>sudo timedatectl set-timezone America/New_York
  </code></pre></li>
  <li><p>Afterwards I logged in to MySQL and noticed that the time zone was still incorrect</p>
  
  <pre><code>mysql&gt; select now();
  </code></pre></li>
  <li><p>I restarted the MariaDB service on my server</p>
  
  <pre><code>sudo systemctl restart mariadb
  </code></pre></li>
  <li>I logged in to MySQL again and confirmed that the hour matched my time zone settings</li>
  <li>I ran again the command from SSH using both curl and cv (see here for details on how to set that up: <a href="https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/" rel="nofollow noreferrer">https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/</a>)</li>
  <li>I finally confirmed that the scheduled e-mails were triggered as intended</li>
  </ol>
  
  <p>I hope this solution can help others solve this otherwise tricky workaround.  My intuition was based on the fact that the CRON job itself was not failing, and my user had all the correct Drupal permissions (I verified by logging in and checking to see if all contacts were visible).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-22T00:32:50.880Z
Answers.LastActivityDate: 2018-07-22T00:32:50.880Z
Answers.UserDisplayName: R. Alfaro
Body: <p>CiviMail scheduled e-mails are not being triggered automatically through CRON.  Using the same user with the same permissions, I get the following in the log when triggered through the Scheduled Jobs user interface:</p>
  
  <pre><code>Parameters parsed (and passed to API method): 
  a:1:{s:7:"version";i:3;}
  
  Full message: 
  Finished execution of Send Scheduled Mailings with result: Success (a:1: 
  {s:9:"processed";i:1;})
  </code></pre>
  
  <p>But when the same is triggered on CRON using CURL</p>
  
  <pre><code>Parameters parsed (and passed to API method): 
  a:1:{s:7:"version";i:3;}
  
  Full message: 
  Finished execution of Send Scheduled Mailings with result: Success (a:1: 
  {s:9:"processed";i:0;}
  </code></pre>
  
  <p>I'm not getting any errors when I call the CRON page from the browser.  On the CiviCRM status page it shows that CRON is running.  In conclusion, the scheduled task processes address only from the user interface and not from CRON.</p>
  
  <p>I am using the latest CiviCRM build (5.3.1).</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-21T22:48:15.740Z
Comments.Text: sounds like it might not be picking up the user to run under..
  
  What CMS are you using  - for Drupal & Wordpress there are better command line utilitites for running sched jobs (drush & wp-cli)
Comments.UserDisplayName: user4278
Tags: <civimail><cron-job><cron><mailing>
Title: process_mailing processing addresses when called in UI but not CRON
ThreadText: # process_mailing processing addresses when called in UI but not CRON
  
  (Asked by: username_0 on 2018-07-21)
  
  CiviMail scheduled e-mails are not being triggered automatically through CRON.  Using the same user with the same permissions, I get the following in the log when triggered through the Scheduled Jobs user interface:
  Parameters parsed (and passed to API method): 
  a:1:{s:7:"version";i:3;}
  
  Full message: 
  Finished execution of Send Scheduled Mailings with result: Success (a:1: 
  {s:9:"processed";i:1;})
  
  But when the same is triggered on CRON using CURL
  Parameters parsed (and passed to API method): 
  a:1:{s:7:"version";i:3;}
  
  Full message: 
  Finished execution of Send Scheduled Mailings with result: Success (a:1: 
  {s:9:"processed";i:0;}
  
  I'm not getting any errors when I call the CRON page from the browser.  On the CiviCRM status page it shows that CRON is running.  In conclusion, the scheduled task processes address only from the user interface and not from CRON.
  I am using the latest CiviCRM build (5.3.1).
  
  **Tags:** civimail, cron-job, cron, mailing
  
  > **Comments:**
  > **username_1**: sounds like it might not be picking up the user to run under..  What CMS are you using  - for Drupal & Wordpress there are better command line utilitites for running sched jobs (drush & wp-cli)  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2018-11-26. Score: 3
  
  Had the same problem, on Ubuntu change the system time zone with "sudo dpkg-reconfigure tzdata". Restart the mysql service with "sudo service mysql restart".
  
  Can confirm that this gets the cron running and processing the mailing.
  
  
  ---
  
  ### Answer by username_0 on 2018-07-22. Score: 2
  
  I figured out that it was due to a time zone setting mismatch between MariaDB and PHP.  Taking inspiration in this forum post https://forum.civicrm.org/index.php%3Ftopic=26132.0.html, I observed that the time zone settings on the server were different than in the database.  My workaround was as follows:
  
  On Drupal, I disabled the option to allow users to select their own time zones and made sure that America/New York was selected
  On my server (I have CentOS 7 running) I selected the time zone
  sudo timedatectl set-timezone America/New_York
  
  Afterwards I logged in to MySQL and noticed that the time zone was still incorrect
  mysql> select now();
  
  I restarted the MariaDB service on my server
  sudo systemctl restart mariadb
  
  I logged in to MySQL again and confirmed that the hour matched my time zone settings
  I ran again the command from SSH using both curl and cv (see here for details on how to set that up: https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/)
  I finally confirmed that the scheduled e-mails were triggered as intended
  
  I hope this solution can help others solve this otherwise tricky workaround.  My intuition was based on the fact that the CRON job itself was not failing, and my user had all the correct Drupal permissions (I verified by logging in and checking to see if all contacts were visible).
  
  
  ---
  
  