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 9059823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:04:08+00:00 2026-06-16T15:04:08+00:00

having a strange issue here. I have ~/Library/LaunchAgents/com.me.helloworld.plist with the following contents: <?xml version=1.0

  • 0

having a strange issue here. I have ~/Library/LaunchAgents/com.me.helloworld.plist with the following contents:

<?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.me.helloworld</string>
        <key>ProgramArguments</key>
        <array>
                <string>/Users/me/temp/test.sh</string>
        </array>
        <key>WatchPaths</key>
        <array>
                <string>/Users/me/temp/Journal.txt</string>
        </array>
</dict>
</plist>

The idea is, if ~/temp/Journal.txt is modified, it should execute ~/temp/test.sh. test.sh has the following contents:

#!/bin/bash
echo "hello world from test.sh" >> itchanged.txt

So, if I change Journal.txt, I should get a file called itchanged.txt. When I do the following:

$ launchctl unload ~/Library/LaunchAgents/com.me.helloworld.plist
$ launchctl load ~/Library/LaunchAgents/com.me.helloworld.plist
$ touch Journal.txt

Doing an ls shows that test.txt is not created. However, if I manually do a ./test.sh, then itchanged.txt IS created. So the problem seems to be somewhere in recognizing that Journal.txt is changed and executing the script when this happens.

I am using OS X Mountain Lion. Any ideas?

  • 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-16T15:04:09+00:00Added an answer on June 16, 2026 at 3:04 pm

    Your script doesn’t specify a path for itchanged.txt; since the default working directory for launchd-started processes is /, and your account probably doesn’t have permissions to create files there, itchanged.txt will not ever be created. You should either specify a path in the script, or add the WorkingDirectory key to your .plist to change the default.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a strange issue here, i have this bit of code: <?php if
I'm having a strange issue here. I have a For loop inside a sub,
I'm having a strange issue with drools : I have the following rules :
I am having a strange issue that I can't seem to resolve. Here is
I'm having this strange issue (I've simplified the code here) with clang 3.1 (gcc
Having a strange issue with the TabContainer in the AJAX Toolkit. We have several
I'm having a strange issue that I've never encountered before. I have a partial
I'm having a strange issue with my form in CakePHP. I have a series
I'm having this strange issue where I have an NSArrayController bound to a managedObjectContext
We're having a strange issue here. Unfortunately I'm not at liberty to post the

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.