0

When my Mac starts I want to automatically start a batch script called run.sh in the folder myfolder. When I start Automater I only find options for AppleScript and JavaScript.

  • What do you mean by startup? Directly after boot/before any user logs in, if a specific user logs in, if any user logs in? – nohillside Jan 29 at 18:06
  • Also, the question has come up rather often already, I've linked to two similar questions at the top. If their answers (and others you may find here) don't work for you, please edit the question and add the things you've tried. – nohillside Jan 29 at 18:10
  • @nohllside : It's a background script that most of the time is the only thing the Mac does. It would be great if it happens after boot without a user needing to login. – Christian Jan 29 at 18:11
-1
  1. Create your shell script as run.sh in your $HOME/myfolder folder.

  2. Paste the following one-line script into Script Editor:

    do shell script "$HOME/myfolder/run.sh"
    
  3. Then save it as an application.

  4. Finally, add the application to your login items.

For login item, you can check this page: https://support.apple.com/guide/mac-help/open-items-automatically-when-you-log-in-mh15189/mac

Not the answer you're looking for? Browse other questions tagged .