Beaglebone crontab running python script to power down via shutdown

321 views
Skip to first unread message

hirs...@gmail.com

unread,
Oct 25, 2013, 9:04:29 PM10/25/13
to beagl...@googlegroups.com
I am attempting to bring the Beaglebone down cleanly in the event of a power outage, to do this I am monitoring the AC input in a python script which when the AC power is lost calls a shutdown. If I call this from the cli with no AC but with USB the system shuts down correctly.
If I call this from a cron job the python script executes but the shutdown does not happen. I try to redirect any output to a file but no output is seen, I do see the file update time change each time the cron job fires but as before no shutdown

Any ideas ?

Pedro A. Melendez

unread,
Oct 25, 2013, 9:52:52 PM10/25/13
to beagl...@googlegroups.com
this happened to me, shutdown is actually a call to busybox define on /sbin/ and those not work on cron. You have to call the real command which is 'busybox shutdown'(not sure i dont have th BB with me right now), you call see the command doing 'ls -l /sbin/'.

Hope this helps
Pedro


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

langil...@gmail.com

unread,
May 14, 2015, 7:53:17 PM5/14/15
to beagl...@googlegroups.com
Sorry for the delay...were you able to run the shutdown.  I am trying to automate the shut down in my application but, "shutdown" need to be run from root.
Reply all
Reply to author
Forward
0 new messages