Skip to content Skip to sidebar Skip to footer

Cron Job To Send Ip Of Beaglebone Black (at Every Reboot) To My Email Is Not Firing

I wrote a simple python script which, when executed, gets my BeagleBone Black's ip address and sends it to my email address, preventing me from having to plug the board into my lap

Solution 1:

I had the same problem and found It will only work on a default install only if you leave your terminal open. For whatever reason Ti did some weird changes to the Linux system that automaticity kills any background processes when your terminal is closed. Google beaglebone nohup as there are some settings you have to change to prevent the killing of your processes on exit. You will also have problems trying to get custom services started on boot up and corn does not work as you would expect it to. Welcome to the wild west of Linux

Solution 2:

Problem solved: I am an angstrom newb (previous linux experience is related to ubuntu exclusively), and not much experience with linux generally. So, I had been indiscriminately running opkg upgrade, following opkg update, without specifying what was being upgraded, and therefore likely introducing issues throughout my entire build. So, I started over with the 6/20 image, flashed the board, reconfigured everything, and added this to the python script (above the while loop at the top of the script):

time.sleep(45) #to avoid timing issues

i then added this in cron:

@reboot /home/root/boot_send_ip.py

And now the cron job fires on reboot and I get the IP emailed to me. YAY!

The BB google group has suggested using udhcpc to handle this type of service, which I will look into in the future, but for now this is all working via cron.

Post a Comment for "Cron Job To Send Ip Of Beaglebone Black (at Every Reboot) To My Email Is Not Firing"