launchd job starts directly

Discussion in 'Mac Programming' started by bladepit, Nov 30, 2014.

  1. bladepit macrumors newbie

    Nov 30, 2014
    Trying to create a task that starts on every day at 4AM to restart my mac and execute some maintenance scripts. This is my script:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
    <plist version="1.0">
    If i run launchctl unload / load to reload my plist file it will execute the script. I am a bit confused cause i have set the RunAtLoad parameter to false. Tried a lot of things but i am unable to get it running. Has anyone an idea what is my fault here?

    Operation system: OS X 10.9
  2. kryten2, Nov 30, 2014
    Last edited: Nov 30, 2014

    kryten2 macrumors 6502a

    Mar 17, 2012
    The default of the RunAtLoad key is false. Things you can try :
    • remove the RunAtLoad key
    • try another label string
    • new plist with only label and programarguments
    • <array> not necessary when using only one calendarinterval
    • <integer>4</integer>
    • <integer>0</integer>
  3. bladepit thread starter macrumors newbie

    Nov 30, 2014
    Don't know why but this worked. Copied the plist file and just renamed it and changed the label.


Share This Page