I have the following:
* * * * * open -a /Applications/TextWrangler.app/ ~/notes.txt; open /Applications/Notes.app
Neither of the 2 apps brings focus to the foreground (though they do get launched in the background) so the whole job is a bit pointless (it's to remind me to make some notes at the end of each day at work).
It works if I copy and paste the commands into a terminal. So why does cron behave differently and can this be changed?
reattach-to-user-namespace
(available on homebrew and elsewhere)* * * * * open -a TextWrangler ~/notes.txt; open -a Notes;
works as is for me, both apps come to the front. Try adding; osascript -e 'tell app "TextWrangler" to activate' -e 'tell app "Notes" to activate'
to the end of your existing command and see if that makes any difference.