[GRLUG] crontab not running a working script

Roberto Villarreal rvillarreal at mktec.com
Thu Jan 12 17:48:59 EST 2012


On Thursday, January 12, 2012 05:41:22 pm John-Thomas Richards wrote:

> > Change your script to something like:
> > #!/bin/bash
> > strace 'syncevolution memotoo' > /tmp/strace.out 2>&1
> > 
> > and run your script manually.  Stash 's.out' away, then let cron call it.
> > Compare the two output files... they should almost certainly be
> > different. With luck 'diff' might be able to help, but at some point
> > those logs should differ in a non-trivial way, and that may hold a clue.
> > 
> > (Untested and not 100% if the shell redirection will work properly when
> > under cron, though I'm thinking it will, and may have to play with
> > quotes (to ensure it's the output of strace, and not syncevolution,
> > that's being captures) but using strace was really my point.)
> 
> Hmm...
> 
> jtr at auerbach ~ $ cat /tmp/strace.out
> strace: syncevolution memotoo: command not found
> jtr at auerbach ~
> 
> Bleh.
> --
> john-thomas
> ------
> There are two kinds of fool. One says, "This is old, and therefore
> good."  And one says, "This is new, and therefore better."
> John Brunner, science fiction writer (1934-1995)

Okay, kill the quotes... I just ran a quick test with a command that took an 
argument, and got a similar error... the quotes are making it look like that 
whole thing is the command.  Kill the single quotes, and see if you get your 
file.

Roberto

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the grlug mailing list