Found this [on another answer](https://stackoverflow.com/a/24109138/35794) but an AppleScript that simply contains the following works for me.

     tell application "Finder" to sleep