Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7967649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:57:26+00:00 2026-06-04T06:57:26+00:00

I have the following plist file at ~/Library/LaunchAgents: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE plist PUBLIC

  • 0

I have the following plist file at ~/Library/LaunchAgents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>Label</key>
    <string>com.yogapo.test_launchd</string>

    <key>Program</key>
    <string>. /Users/luke/dev/data_yogapo/script/test_launchd.sh</string>

    <key>StartInterval</key>
    <integer>10</integer>

    <key>RunAtLoad</key>
    <true/>
  </dict>
</plist>

And the test_launchd.sh file is contains the following:

#! /bin/bash 

echo "hello world from test_launchd.sh" >> /Users/luke/dev/data_yogapo/log/development.log

When I run test_launchd.sh manually with
. /Users/luke/dev/data_yogapo/script/test_launchd.sh
the results are as expected: the line appears at the end of development.log

But when I load up this plist file, nothing happens:

$ cd ~/Library/LaunchAgents
$ launchctl load com.yogapo.test_launchd.plist
$ launchctl list | grep yogapo
  -       1       com.yogapo.test_launchd

I’ve tried this with and without the RunAtLoad key. I’ve looked at other answers here on SO as well as elsewhere on the internet. I’ve followed tutorials, and there’s simply nothing happening. Any help much appreciated – thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T06:57:27+00:00Added an answer on June 4, 2026 at 6:57 am

    You are asking launchd to run progam called

    ". /Users/luke/dev/data_yogapo/script/test_launchd.sh"
    

    It will take the entire value of the Program key as the first argument to execvp(see man execvp(3) for more details)

    If you were to examine the system log, you would see something like:

    May 22 21:17:38 dented com.apple.launchd.peruser.501[202]
    (com.yogapo.test_launchd[32986]): posix_spawn(“.
    /Users/luke/dev/data_yogapo/script/test_launchd.sh”, …): No such
    file or directory May 22 21:17:38 dented
    com.apple.launchd.peruser.501[202] (com.yogapo.test_launchd[32986]):
    Exited with exit code: 1

    launchd is not a shell. However, it can interpret hash-bang character sequences to identify which program to use to interpret your script. Therefore, simply specify your script as the program to run:

    <key>Program</key>
    <string>/Users/luke/dev/data_yogapo/script/test_launchd.sh</string>
    

    Note: Should you need to pass arguments to your script, use the ProgramArguments key instead and put the whole command line there. For example:

    <key>ProgramArguments</key>
    <string>/Users/luke/dev/data_yogapo/script/test_launchd.sh arg1 arg2 arg3</string>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code that loads a plist file from the resource folder
I have set the following setting in my app's -info.plist file, but still when
I have a plist with the following structure: <plist version=1.0> <dict> <key>000001</key> <dict> <key>name</key>
I have the following code in my file NSString *filePath = [[NSBundle mainBundle]pathForResource:@images ofType:@plist];
I have a settings bundle in my iPhone app, with the following PList: Type:
I have following method in wcf webenabled service Public Person AddPerson(Person p); As of
I have following class public class ButtonChange { private int _buttonState; public void SetButtonState(int
I have GPS data stored as as .tcx file. This is a xml file
I have a UITableView showing data from a plist file. For this table view,
I implemented the plist in my iOS game following this tutorial: Now I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.