Re: [OT?] Executing Git from bash script invoked by cron
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jun 29, 2010, 06:24 UTC
- Message-ID
- <vpqhbkm9x01.fsf@bauges.imag.fr>
- In-Reply-To
- <4C290D88.80306@cedarsoft.com>
Johannes Schneider <mailings@cedarsoft.com> writes:
> But the same script executed by cron, does not work. Git push does > simply nothing. No output, no push, nothing. > But git log and git --version works...
One common problem with cron jobs is that you don't have the same $PATH in your shell and in cron. If you have no output at all, I'd say you didn't reach the line where git is executed in your script.
Try to add a
set -x
at the beginning of your script to see what it's doing.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/