From: Marc Weber <marco-oweber@gmx.de>
To: git <git@vger.kernel.org>
Subject: Re: [OT?] Executing Git from bash script invoked by cron
Date: Mon, 28 Jun 2010 23:17:17 +0200 [thread overview]
Message-ID: <1277759597-sup-9397@nixos> (raw)
In-Reply-To: <4C290D88.80306@cedarsoft.com>
Excerpts from Johannes Schneider's message of Mon Jun 28 23:00:56 +0200 2010:
> Hash: SHA1
>
> Hi,
>
> I try to mirror my local git repository.
> Therefore I created a bash script. This script, executed form the
> command line, works fine.
>
> 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...
>
> I tried to google the problem, but couldn't not find anything useful.
> Any hints are welcome.
What do you do in such cases? Make sure you log both: stdout and stderr.
a)
sh -c 'your quoted command &> /tmp/logfile'
b) if this still does not work use strace:
sh -c 'strace -f-o /tmp/strace.log your quoted command &> /tmp/logfile'
Then you know how much is happening.
You may also want to check that the environment is the same. Eg
export > file to create a file containing your environment.
Then source it in the cron job line somehow.
I'm not using cron that often so the solution could be simpler.
Marc Weber
next prev parent reply other threads:[~2010-06-28 21:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-28 21:00 [OT?] Executing Git from bash script invoked by cron Johannes Schneider
2010-06-28 21:05 ` Sverre Rabbelier
2010-06-28 21:17 ` Marc Weber [this message]
2010-06-28 21:22 ` Sverre Rabbelier
2010-07-03 17:19 ` Johannes Schneider
2010-06-28 21:43 ` Ramkumar Ramachandra
2010-06-29 6:24 ` Matthieu Moy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1277759597-sup-9397@nixos \
--to=marco-oweber@gmx.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).