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.
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
STRERR streams. For example:
# /bin/echo "Hello world" > /dev/null
As it is stated in descriptions:
- notifications with Errors only status will be sent if there is the standard error stream of the command only. If the stream is empty, no notification will be sent.
- notifications with Every time status will be sent if there is any output of the command. If the output is empty, no notification will be sent
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.