I have an applescript which contains the line:
-- runs the command system_profiler and grabs the relevant result line
set AirPort to (do shell script "system_profiler |grep 'Current Wireless Network:'").
It works perfectly when run directly from the script editor and when exported as an app. I put it into cron (via cronnix) and when cron tries to run it, it fails with a message roughly "could not find command system_profiler". If I run it from cronixx - by choosing 'run now' again it works perfectly.
Any ideas why cron cannot run the shell script.
Thanks
(Incidentally, the purpose of the line is to find out where the macbook is and run a backup if it is in the office, but not elsewhere. It is a slightly sledgehammer approach to finding which wireless network I am attached to, any better ideas ?)
-- runs the command system_profiler and grabs the relevant result line
set AirPort to (do shell script "system_profiler |grep 'Current Wireless Network:'").
It works perfectly when run directly from the script editor and when exported as an app. I put it into cron (via cronnix) and when cron tries to run it, it fails with a message roughly "could not find command system_profiler". If I run it from cronixx - by choosing 'run now' again it works perfectly.
Any ideas why cron cannot run the shell script.
Thanks
(Incidentally, the purpose of the line is to find out where the macbook is and run a backup if it is in the office, but not elsewhere. It is a slightly sledgehammer approach to finding which wireless network I am attached to, any better ideas ?)