0

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!

2 Answers 2

0

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.

0
0

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.

3
  • 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: $?"; }
    – rda3000
    May 15, 2012 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? May 16, 2012 at 0:35
  • it's perl - and it runs manually with just the command todo.sh recur
    – rda3000
    May 16, 2012 at 13:27

You must log in to answer this question.

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