[GRLUG] crontab not running a working script

John-Thomas Richards jtr at jrichards.org
Thu Jan 12 15:08:43 EST 2012


On Thu, Jan 12, 2012 at 02:54:26PM -0500, Bob Kline wrote:
> On Thu, Jan 12, 2012 at 2:45 PM, John-Thomas Richards <jtr at jrichards.org>wrote:
> > > > But does your script need your environment?
> > > > The absolute path gets your script, but under
> > > > what environment does cron run it?
> > > >
> > > > The crontab(1) points out that a user can have
> > > > their own crontab file, but seems a little vague
> > > > about whether that implies anything about the
> > > > user's own environment.
> > > >
> > > > Can you direct any error messages when
> > > > the command is run to yourself?
> > >
> > > By default, cron emails the output of commands to the user the command
> > > was run as, or root if it's a system cron job.
> > >
> > > So, the output of the command should be in his inbox.
> >
> > The output of the command is as I mentioned: could not read password.
> > --
> >
> So if root is running cron, then it's "could not read" as in could not
> find?
> 
> So you can redirect the file containing your password to your script?
> Absolute path.  I think everything at the end of the crontab entry is
> your stuff, so you can use "< file".
> 
> Or something thereabouts.  Do you use a "read" commend in your script?

I could guess at what `read' would do in a script but my scripting
skills are really limited to automating what I can do from the
commandline.  My script is exactly as I posted:

        #!/bin/bash
        syncevolution memotoo

Nothing more, nothing less.

Telling syncevolution which source to use (in this case memotoo) tells
syncevolution where the config files are (including the stored password
since they're all together in the syncevolution directory).

I don't think (might be ignorance speaking here) pointing the script to
the config files is the issue since the error message indicates it can't
read the password.  It doesn't say "what in the world is 'memotoo'?"
-- 
john-thomas
------
The death of democracy is not likely to be an assassination from ambush. It
will be a slow extinction from apathy, indifference, and undernourishment.
Robert Maynard Hutchins, educator (1899-1977)

-- 
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