If you reread the manual you will find a -w switch, use this for loading. I am not sure if this is your real problem however. When I’m in doubt whether a launchd process is running, I include a line like.
touch ~/Desktop/isrunning.txt
Then I see wether the thing is running. If you are trying to run the script every time you login into your computer, and only that time, creating a login hook might be worth an investigation. Search for “login hook” here.
I assume this should a user based launch daemon respective agent.
I assume also that the script should only be executed once at login.
Then you should install a user based launchd agent instead of a system based launchd daemon
So omit the KeepAlive parameter and save the script in your user library folder in the LaunchAgents folder.
With your environment launchctl doesn’t work, because you need sudo to affect daemons/agents in /Library and /System/Library
Just my two cents,
isn’t it easier to install the script or an alias pointing to it in the list of Login Items during the Startup process.
This feature is ruled in the Preference Pane “Comptes” in French. I guess that it’s named “Users” in English.
I have four scripts in this list for years and everything behave flawlessly.
I will add a couple of cents too. The login hook for login and logout items I described, which are installed via the defaults system are system wide, and are executed during login/logout which means that the need root rights, and are executed before any login items are executed. The logout hook is the last process run under logout.
There is also an utility which enables you to run processes every time the computer wakes or goes to sleep. This is stuff that a normal launchd process can’t handle as launchd doesn’t have events for the processor going to sleep and awakes from sleep and calls for a little unix utility named SleepWatcher which can be found via google.