Kill MacOS Processes by Name
- One minute read - 55 wordsI have a cron job that opens a program every day at a certain time. How can I also close it with a cron job?
To open:
45 9 * * 1-5 open -a "SomeProgram"
And to close a few minutes later:
50 9 * * 1-5 killall "SomeProgram"
See man killall
for more information.