Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've set up this todo.txt add-on and now I want to run todo.sh recur every morning. I've got Lingon (a Mac GUI) running the command, but I get the following error:

5/15/12 10:33:00.067 AM ryan-recurring-tasks: Can't exec "todo.sh": No such file or
directory at /Users/ryan/Dropbox/todo/.todo.actions.d/recur line 70.

I was advised to set the environment variable explicitly, but I'm not sure of the syntax. I've tried all these, but no dice:

launchctl setenv TODO_SH $TODO_SH

launchctl setenv TODO_SH $/Users/ryan/Dropbox/todo/todo.sh

launchctl setenv TODO_SH /Users/ryan/Dropbox/todo/todo.sh

Here are my Lingon settings for the command, in case there's an option there that might help. I don't know what the "Changes to this path" field represents...

Thanks for any help!

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

The recur script is expecting todo.sh to be in your path (that's what $TODO_SH eventually expands to). There are a number of ways to add your extended path (including the Dropbox todo dir) to launchd's path, but the better fix may be to edit the recur add-on to say:

my @args = ($ENV{TODO_FULL_SH}, "command", "add", $add);

instead.

If that works, let me know, I'll update the released script.

share|improve this answer
    
Thanks, worked a charm. –  ryancito May 30 '12 at 18:01
add comment

It looks like the script depends on /Users/ryan/Dropbox/todo/.todo.actions.d/recur. Does this file actually exist?

The "Changes to this path" options tells launchd to execute the script or command when the given folder is changed. It's unrelated to your problem.

share|improve this answer
    
That file does exist, and here's the reference to todo.sh (around line 70) that is throwing the error: for my $add (@$adds) { my @args = ($ENV{TODO_SH}, "command", "add", $add); (system(@args) == 0) or die "system @args failed: $?"; } –  ryancito May 15 '12 at 17:14
    
So that's a php script? It seems like you'd need to call it like so, php -f /Users/ryan/Dropbox/todo/todo.sh Does it run if you invoke it manually? –  Peet Corelli May 16 '12 at 0:35
    
it's perl - and it runs manually with just the command todo.sh recur –  ryancito May 16 '12 at 13:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.