- Plesk for Linux
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.
Хорошо. Понаблюдаем и сообщим вам о результате.
That note should be mentioned in the plesk also:
"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."
Hello @Stavros T
Thank you for pointing our attention to that. I created the internal request to appropriate team for adding this note.
Is there a method you could suggest that would send error messages only?
Please sign in to leave a comment.