R rebby macrumors 6502 Original poster Nov 19, 2008 312 1 MN Jan 25, 2011 #1 Does anybody know of a way to check the battery status from the console on a Macbook? I'd like to create a cron job that will only execute if running on A/C power. I've done a few searches and have come up empty thus far. Thanks!
Does anybody know of a way to check the battery status from the console on a Macbook? I'd like to create a cron job that will only execute if running on A/C power. I've done a few searches and have come up empty thus far. Thanks!
R rebby macrumors 6502 Original poster Nov 19, 2008 312 1 MN Jan 25, 2011 #2 Looks like I jumped the gun on this one. It's buried with-in ioreg -> Code: ioreg -l | awk '/ExternalConnected/ {print $5}' Will output "Yes" if external power is connected, "No" otherwise.
Looks like I jumped the gun on this one. It's buried with-in ioreg -> Code: ioreg -l | awk '/ExternalConnected/ {print $5}' Will output "Yes" if external power is connected, "No" otherwise.