Soumen Roy
asked on
How do I send an email from raspberry pi at user login?
Hello experts,
I want my raspberry pi to send me an email notification (on gmail) whenever an user logs in or logs out..
I tried running my script @reboot from crontab -e. The script runs well when tested, but cannot run at reboot or startup..
How do I get it working??
Thanks in advance.
I want my raspberry pi to send me an email notification (on gmail) whenever an user logs in or logs out..
I tried running my script @reboot from crontab -e. The script runs well when tested, but cannot run at reboot or startup..
How do I get it working??
Thanks in advance.
ASKER
@omararfarid
I am new to Linux, so it was a bit tough for me to understand..
I have set full pathnames though.. Here is a snap of the script and the cronjob list.
d.jpg
I am new to Linux, so it was a bit tough for me to understand..
I have set full pathnames though.. Here is a snap of the script and the cronjob list.
d.jpg
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you, I will try it and tell if it has been solved..
ASKER
May I ask you what do you mean by "source your ~/.bash_profile ", please?
Regards,
Soumen
Regards,
Soumen
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That worked.
Thank you.
Sorry for such a late reply.
Thank you.
Sorry for such a late reply.
No problem :)
- set required env. variables e.g. PATH
- use full pathnames for files and folders
- redirect stdin, stdout & stderr