2

I'm having a problem where I made a shell file to send me an email. I then put this shell file to be run by crontab at reboot (I reboot daily at 5am before I go to school) sSMTP works already because when i goto the /usr/scripts directory and i run ./rebootmsg.sh it works and sends me an email

#!/bin/sh
#shell file contents located in /usr/scripts/rebootmsg.sh
#i already ran chmod 777 on this file
echo "Crontab Reboot Successful!" | /usr/sbin/ssmtp -s "Rebooted!" myemail@whatever.com

this is the crontab code:

 @reboot sh /usr/scripts/rebootmsg.sh

the crontab is not under any root user, just the normal pi user that raspberry pi comes with

sjfklsdafjks
  • 149
  • 2

0 Answers0