Friday, December 15, 2017

#1 2002-01-31 04:16:37 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Applescript in cron; error 2709

Hi,
I'm using the following script from cron, but running into errors. I'm placing this script in ~/bin/alarm-clock.sh and calling from cron with: ~/bin/alarm-clock.sh wake me up

Applescript:

#!/bin/sh
this_playlist="$*"
/usr/bin/osascript <<EOF
tell application "iTunes"
tell source "Library"
tell playlist "$this_playlist"
play
end tell
end tell
end tell
EOF

It works fine on the command line, but from cron I get the error: syntax error: Can't get the application's event dictionary. (-2709)
Any ideas?
TIA
Cog.


One mans trash is another mans treasure


Filed under: iTunes

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)