Running a command in Terminal from Automator?

Discussion in 'Mac Programming' started by JGruber, Jul 7, 2009.

  1. macrumors 6502

    Joined:
    Feb 13, 2006
    #1
    Ok, so on my OSX server, we have Python running at 100% CPU usage at random times, and to get it to stop, I'm forced to run a Terminal command.

    I want to know if it is possible to use Automator to run said command in Terminal under root once a day at a given time, with no user input.

    The command I am using is
    Code:
    sudo killall -9 Python
     
  2. Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    You're probably better off scheduling it with cron.
     
  3. macrumors 6502

    Joined:
    Jun 2, 2009
    #3
    cron is probably what you want, but if you really need to do it in Automator, you can create a shell script with your command in it and then use the "Run Shell Script" action.
     

Share This Page