Skip to content

Conversation

E-VANCE
Copy link
Contributor

@E-VANCE E-VANCE commented Dec 15, 2022

With our multisite-setup I have been seeing hourly attempts within our Mailgun-logs to send out an email notification regarding the cron job that is set up there:

cd {{ www_root }}/{{ item.key }}/{{ item.value.current_path | default('current') }} && wp site list --field=url | xargs -n1 -I \\% wp --url=\\% cron event run --due-now > /dev/null 2>&1

Seeing that > /dev/null 2>&1 is appended, this shouldn't be happening...

Wrapping the two joint commands in brackets ((wp site list --field=url | xargs -n1 -I \\% wp --url=\\% cron event run --due-now) > /dev/null 2>&1) fixes the standard output and I am not seeing any attempts to send out email notifications in our Mailgun logs any more.

Have successfully tested running the new command in full on our server and it performs as expected.

@swalkinshaw
Copy link
Member

I couldn't really replicate this locally with different commands, but it makes sense in theory and there shouldn't be any downside regardless 👍

@swalkinshaw
Copy link
Member

@E-VANCE could you rebase to get rid of the other two commits please?

@E-VANCE
Copy link
Contributor Author

E-VANCE commented Dec 15, 2022

@swalkinshaw Sorry for the overhead / mess... Should be clean now.

@swalkinshaw swalkinshaw merged commit 8038b1a into roots:master Dec 15, 2022
paulbrzeski pushed a commit to paulbrzeski/trellis that referenced this pull request Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants