Dear Sir/Madam,
The notification function in the crontab doesn't work.
I had a situation with my backup and trusted that I would get an e-mail, but on failure of the cron, I never got an e-mail.
I have also set Telegram up, but both doesn't work in the crontab.
When I test Telegram and e-mail in de settings/Alarm tab, I get an e-mail and a Telegram message. So, I have set it up right.
When the cron failed, e.g. host can't connect to sftp, I get an error when aaPanel tries to send a notification:
|-Error:File upload error: Cannot connect to SFTP:Unable to connect to www.xxxx.xxxx: [Errno 110] Connection timed out
Traceback (most recent call last):
File "/www/server/panel/plugin/ftp/ftp_main.py", line 2077, in <module>
client.execute_by_comandline(sys.argv)
File "/www/server/panel/plugin/ftp/ftp_main.py", line 988, in execute_by_comandline
backup_tool.backup_site(args[2], save=int(args[3]))
File "class/panelBackup.py", line 425, in backup_site
self.send_failture_notification(error_msg, target=siteName, remark=remark)
File "class/panelBackup.py", line 873, in send_failture_notification
title = self.generate_failture_title()
TypeError: generate_failture_title() missing 1 required positional argument: 'task_name'
OR:
|-Error:File upload error: Cannot connect to SFTP:Unable to connect to www.xxxxx: [Errno 110] Connection timed out
name 'send_mail' is not defined
|-Error:Failed to send notification
I have tried all situations. Send an e-mail, send a Telegram message, send both.
Kind regards,
Coskun