I've spent the last day googling this issue and can't get it figured out. Apparently, Big Sur treats load and unload as legacy and you are supposed to use enable and disable however I've tried many different combinations of commands and still can't get my plist to work. Load and unload give Input/Output errors.

I have a script that runs every 30 minutes during the day. It is located in ~/Library/LaunchAgents and is called com.office.ks.ExportData. It worked fine before Big Sur but now doesn't run. If I type launchctl list I see that the process has a 126 error.

I've tried so many different types of commands using user/501, gui/501, sudo, changing where spaces are, etc. I can't seem to get anything to work. All I'm trying to do is get my script to run every 30 minutes between 9am-5pm which never was an issue before.

sudo launchctl enable user/501/~/Library/LaunchAgents/com.office.ks.ExportData.plist

Can somebody please help me get this plist enabled? When I type the above command it doesn't give a message but doesn't give an error either. It just goes to the next line waiting for a new command.

  • RE: "I have a script that runs every 30 minutes during the day." -- What type of script? What's in the script and what's in the com.office.ks.ExportData.plist file? Where is the script- located? Commented Sep 11, 2021 at 20:03

2 Answers 2


@Gordon Davidson figured it out. I was having the same problem with launchd plists that executed from my ~/Documents/scipts folder. The odd think is, they ran fine from a Google Drive folder Documents were linked to but on machines that just had my regular ~/Documents/scripts, they'd fail with error 126.

Move the scripts do a different directory like ~/Library/scripts


An return code status of 126 signifies that the command you are trying to use is available, but not executable.

  • …which might lead to a conclusion that there is a runtime permissions error - though not one I'm qualified to find or fix. Check executable perms, perhaps.
    – Tetsujin
    Commented Sep 11, 2021 at 18:50
  • I can manually run the script (.sh file) but the issue is when doing it in launchd. It worked fine before the BigSur upgrade but now won't work. I'm not sure what permission would have been disabled so if anybody has a thought please let me know. Thanks!
    – ks-man
    Commented Sep 11, 2021 at 18:59
  • Try granting '/bin/bash' (assuming this is your script's shell) full disk access: System Preferences > Security & Privacy > Privacy > Full Disk Access
    – JRFerguson
    Commented Sep 11, 2021 at 19:18
  • 1
    @ks-man Where is the script/command it is trying to run? If it's in a folder that macOS considers "private" (e.g. ~/Documents or ~/Desktop; see this question), my first recommendation would be to move it (and any files it uses) somewhere nonprivate. If that's not possible see this question about granting it access. Commented Sep 11, 2021 at 19:38
  • I'm about to run out but will try this later. The script is located in ~/Documents. Did this just change with one of the newer OS releases? I believe we just went from Mojave to BigSur and the script was located there before. Thanks!
    – ks-man
    Commented Sep 11, 2021 at 19:45

You must log in to answer this question.

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