[ubuntu-uk] Shutdown mysql with cron

Sean Miller sean at seanmiller.net
Wed Aug 11 07:12:37 BST 2010

On 11 August 2010 07:01, Simon Greenwood <sfgreenwood at gmail.com> wrote:
> Not sure of the detail but it will be something that's present in the shell
> that's not present in the session invoked from cron. As Sean says, logging
> the event will give you a clue as to why it's failing. I would suggest that
> you will need to wrap an environment around the command.

It's an interesting one, because you'd expect the scripts in
/etc/init.d to be designed to run from scripts rather than
interactively as they are (generally) initiated on startup etc. so
should be "complete"... but I totally concur with your analysis here
because I have had so many instances (albeit more when working with
hp-ux than Linux) where a cron job fails because the environment is
not set as it would be for an interactive user (paths missing etc.)


More information about the ubuntu-uk mailing list