Plesk

Scheduled tasks notifications in Plesk are not sent to email indicated in cron task settings

Symptoms

Scheduled tasks notifications in Plesk are not sent to email indicated in cron task settings: Option Send to the default email or Send to the email I specify is set in Tools & Settings > Scheduled Tasks, but notifications were not sent.

Cause

Plesk uses cron daemon to perform scheduled tasks and, by default, cron daemon does not send an e-mail if the task does not return any output to STDOUT or STRERR streams. For example:

# /bin/echo "Hello world" > /dev/null
#

As it is stated in descriptions:

Resolution

Consider to modify the scheduled task, so that it generates any output. For example:

<scheduled_command> | echo "Scheduled task executed successfully"

This way, after its execution, "Scheduled task executed successfully" text will be propagated to STDOUT and an e-mail notification will be sent.

Note: option Run Now is intended for test purposes and does not send a notification, even if there is output. An email is sent when the task is executed automatically only.