So I have a python script that pulls down git/svn/p4 repositories and does some writing to a database.I'm simply trying to automate the running of this script and based from what I see in syslog it is being run, even the file I tried piping the output to is being created however the file is empty. Here is the cron job:10 04 * * * user /usr/bin/python2.7 /home/user/script.py -f someFlag > ~/cronout.log 2&>1Kinda stumped and don't know where to start. Thinking its maybe the requirement of passwords for the keychain and what not. Any ideas would be helpful!
Cron job not behaving as expected
cron;python;git;subversion;ssh agent
So it turns out the problem was with environment variables that the Python script needed, and it was so early on in the script that it broke the script before it even output anything.Cron does not have a regular environment.Furthermore ssh passwords were required for pulling git repos which i was able to solve by using Keychain.Using the help of this blog post and some bash wrapper scripts I was able to get everything working and automated.