

OS X, being based on UNIX, has no idea what to do with a. That's what you're looking at here.bat files are MS-DOS batch files.

Now, someone hands you directions for that task and they are written in. Let's further assume that you need to do a task that consists of several steps, each with very specific instructions. more details would be helpful.Let's assume you're Chinese and don't speak a lick of English. However, LaunchDaemons are not supposed to have user interaction, which it seems like you want. if you need to have one running instance for all users you need to use a LaunchDaemon. Note: using a LaunchAgent means that a separate instance of this process will be created for each user who logs in, and that the process will not be running if no user is logged in. It's up to you to make sure users have the correct permissions to quit the process if it gets stuck.

The KeepAlive key specifies that if the daemon quits launchd should automatically restart it. This job will start the script as a daemon so that it's running for all users. Then restart the machine or load the plist using launchctl in terminal. Open TextEdit, make sure the open document is set to plain text (not rich text), copy in the following text, then save it as user.bash_tostart in the folder /Library/LaunchAgents/. I'm not sure whether this should be a LaunchDaemon or a LaunchAgent - if it requires user interaction as you sugest it should really be the latter, so that's what I'll show how to do. I would like to find out/confirm if Automator is what and all I need? If not, what are my options out there?Īny suggestion and advice would be greatly appreciated! Thank you so much for reading! I did some quick research and found out about Automator. I would like to automate opening up a terminal and running a bash script when my MAC starts up, and have the script always running in the background regardless of which user is currently logged in, and I would like the user to be able to stop the script and restart it if it somehow gets stuck. I am using Selenium (a UI automation tool) to automate some web testing, and my script will be calling the Selenium library to start a server to listen for requests, and it will launch browser and run tests when a request comes in. I am looking for some application that is equivalent to Window's Task Scheduler - bascially, I have a bash script and I would like it to start running at startup and be always running in the background, no matter who logs into the computer, and whoever logged in can restrat the script if needed.īackground info (if that helps understand what I am trying ot accomplish):
