Answers.Body: <p>OK, answering my own question after much investigation. This was a bitnami civiCRM stack and the crontab to run Job.execute was running as the bitnami user (our error), but needed to run as daemon.
  That is documented on bitnami's site:
  <a href="https://docs.bitnami.com/bch/apps/civicrm/configuration/configure-scheduler/" rel="nofollow noreferrer">https://docs.bitnami.com/bch/apps/civicrm/configuration/configure-scheduler/</a></p>
  
  <p>Strange behaviour as a result of this - cron seemed to be running fine, but it clearly didn't have permissions to send emails.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-02T13:31:01.630Z
Answers.Text: How did you end up changing the user running job.execute?
Answers.UserDisplayName: ajasper
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-05T01:10:02.687Z
Answers.Text: See the updated URL - you enter the username as part of the crontab entry:
  https://docs.bitnami.com/general/apps/civicrm/configuration/configure-scheduler/
Answers.UserDisplayName: danielrobertson
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-09T07:22:41.367Z
Answers.LastActivityDate: 2020-04-09T07:22:41.367Z
Answers.UserDisplayName: danielrobertson
Body: <p>I am attempting to set up a Scheduled Reminder for Scheduled Activities (CiviCRM 5.20.2/Drupal 7).<br>
  I have a Scheduled Reminder set up as follows:
  <a href="https://i.sstatic.net/gN4Y5.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/gN4Y5.png" alt="Image of Schedule Reminders screen showing Phone Call reminder"></a></p>
  
  <p>This is setup to send to the Activity Assignees, 0 hours before a Scheduled Phone Call activity. It is enabled, and has a simple email message.</p>
  
  <p>Under Scheduled Jobs, I can see that "Send Scheduled Reminders" (Job.send_reminder) is enabled, is running always, and the logs say it is successful.</p>
  
  <p><a href="https://i.sstatic.net/D1Jre.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/D1Jre.png" alt="Finished execution of Send Scheduled Reminders with result: Success (1)"></a></p>
  
  <p>If I then create an Activity of type Phone Call, set its status to Scheduled, set the time to 30min in the future, and assign it to myself, I will immediately get a system generated Activity Summary email. In 30min time I will <strong>not</strong> get a reminder from the Scheduled Reminder, with the template I defined.</p>
  
  <p>Can anyone tell me why, or tell me where to look for more information? Are there logs which will show me if the reminder is actually being triggered, or if an attempt is made to send the email?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-03T08:14:43.253Z
Comments.Text: You could try changing it to 0 hours AFTER the activity time and see if that makes a difference?
Comments.UserDisplayName: RebeccaTregenna
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-06T03:40:29.047Z
Comments.Text: Thanks for the suggestion - unfortunately it still didn't trigger. I also tried setting repetitions, but they also didn't trigger.
Comments.UserDisplayName: danielrobertson
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-06T23:56:14.280Z
Comments.Text: OK, I have discovered the civicrm_action_log which I can view using phpmyadmin. All the reminders are visible there - all have an error "Failed to send message". This looks email related.
Comments.UserDisplayName: danielrobertson
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-08T23:10:42.080Z
Comments.Text: Continuing to debug - after switching to sendmail from direct SMTP to Amazon SES, we have discovered that the emails are being sent, but apart from the "To:" field, they are completely blank. No subject, no body. Has anyone encountered this?
Comments.UserDisplayName: danielrobertson
Tags: <activities><scheduled-reminders><scheduled-job><logs>
Title: Not receiving email from Scheduled Reminder for Activity
ThreadText: # Not receiving email from Scheduled Reminder for Activity
  
  (Asked by: username_0 on 2020-04-03)
  
  I am attempting to set up a Scheduled Reminder for Scheduled Activities (CiviCRM 5.20.2/Drupal 7).  
  I have a Scheduled Reminder set up as follows:
  [![Image of Schedule Reminders screen showing Phone Call reminder](https://i.sstatic.net/gN4Y5.png)](https://i.sstatic.net/gN4Y5.png)
  
  This is setup to send to the Activity Assignees, 0 hours before a Scheduled Phone Call activity. It is enabled, and has a simple email message.
  
  Under Scheduled Jobs, I can see that "Send Scheduled Reminders" (Job.send\_reminder) is enabled, is running always, and the logs say it is successful.
  
  [![Finished execution of Send Scheduled Reminders with result: Success (1)](https://i.sstatic.net/D1Jre.png)](https://i.sstatic.net/D1Jre.png)
  
  If I then create an Activity of type Phone Call, set its status to Scheduled, set the time to 30min in the future, and assign it to myself, I will immediately get a system generated Activity Summary email. In 30min time I will **not** get a reminder from the Scheduled Reminder, with the template I defined.
  
  Can anyone tell me why, or tell me where to look for more information? Are there logs which will show me if the reminder is actually being triggered, or if an attempt is made to send the email?
  
  **Tags:** activities, scheduled-reminders, scheduled-job, logs
  
  > **Comments:**
  > **username_1**: You could try changing it to 0 hours AFTER the activity time and see if that makes a difference?  
  > **username_0**: Thanks for the suggestion - unfortunately it still didn't trigger. I also tried setting repetitions, but they also didn't trigger.  
  > **username_0**: OK, I have discovered the civicrm_action_log which I can view using phpmyadmin. All the reminders are visible there - all have an error "Failed to send message". This looks email related.  
  > **username_0**: Continuing to debug - after switching to sendmail from direct SMTP to Amazon SES, we have discovered that the emails are being sent, but apart from the "To:" field, they are completely blank. No subject, no body. Has anyone encountered this?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-04-09. Score: 3 | Accepted answer
  
  OK, answering my own question after much investigation. This was a bitnami civiCRM stack and the crontab to run Job.execute was running as the bitnami user (our error), but needed to run as daemon.
  That is documented on bitnami's site:
  <https://docs.bitnami.com/bch/apps/civicrm/configuration/configure-scheduler/>
  
  Strange behaviour as a result of this - cron seemed to be running fine, but it clearly didn't have permissions to send emails.
  
  > **Comments:**
  > **username_2**: How did you end up changing the user running job.execute?  
  > **username_0**: See the updated URL - you enter the username as part of the crontab entry: https://docs.bitnami.com/general/apps/civicrm/configuration/configure-scheduler/  
  
  ---
  
  