Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Commit 53f59c9

Browse files
drazenCEgregharvey
authored andcommitted
Cron email specifics (#675)
* Cron-email-specifics * Cron-email-specifics-fix * Tweaking-cron-mail * Cron-email-specifics
1 parent 1113b5f commit 53f59c9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

roles/cron/cron_drupal7/tasks/job.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- name: Define cron job command if deferred (ASG).
77
ansible.builtin.set_fact:
88
_cron_job_command: >-
9-
cd {{ ce_deploy_base_dir }} && {{ ce_deploy_ansible_location }} {{ drupal.defer_target }} -m shell -a "{{ cron_job_command }} > /dev/null 2>&1{% if entry.cron_error_mailto is defined %} || (echo 'Command failed' | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}){% endif %}"
9+
cd {{ ce_deploy_base_dir }} && {{ ce_deploy_ansible_location }} {{ drupal.defer_target }} -m shell -a "{{ _cron_job_command }} > /dev/null 2>&1{% if entry.cron_error_mailto is defined %} || (echo 'Command failed' | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}){% endif %}"
1010
when:
1111
- drupal.defer is defined
1212
- drupal.defer
@@ -16,7 +16,7 @@
1616
- name: Add dev null redirection (for non-deferred).
1717
ansible.builtin.set_fact:
1818
_cron_job_command: >-
19-
{{ cron_job_command }} > /dev/null 2>&1{% if entry.cron_error_mailto is defined %} || (echo 'Command failed' | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}){% endif %}
19+
{{ _cron_job_command }} > /dev/null 2>&1{% if entry.cron_error_mailto is defined %} || (echo 'Command failed' | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}){% endif %}
2020
when:
2121
- drupal.defer is not defined or not drupal.defer
2222

roles/cron/cron_drupal8/tasks/job.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- name: Define cron job command if deferred (ASG).
77
ansible.builtin.set_fact:
88
_cron_job_command: >-
9-
cd {{ ce_deploy_base_dir }} && {{ ce_deploy_ansible_location }} {{ drupal.defer_target }} -m shell -a "{{ cron_job_command }} > /dev/null 2>&1{% if entry.cron_error_mailto is defined %} || (echo 'Command failed' | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}){% endif %}"
9+
cd {{ ce_deploy_base_dir }} && {{ ce_deploy_ansible_location }} {{ drupal.defer_target }} -m shell -a "{{ _cron_job_command }} > /dev/null 2>&1{% if entry.cron_error_mailto is defined %} || (echo 'Command failed' | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}){% endif %}"
1010
when:
1111
- drupal.defer is defined
1212
- drupal.defer
@@ -16,7 +16,7 @@
1616
- name: Add dev null redirection (for non-deferred).
1717
ansible.builtin.set_fact:
1818
_cron_job_command: >-
19-
{{ cron_job_command }} > /dev/null 2>&1{% if entry.cron_error_mailto is defined %} || (echo 'Command failed' | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}){% endif %}
19+
{{ _cron_job_command }} > /dev/null 2>&1{% if entry.cron_error_mailto is defined %} || (echo 'Command failed' | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}){% endif %}
2020
when:
2121
- drupal.defer is not defined or not drupal.defer
2222

0 commit comments

Comments
 (0)