0
votes
1answer
97 views

redirecting output in crontab

I have a shell script to monitor table stats and java apps. It works fine when I run manually. But if I put it in the crontab it will get stuck if I don't redirect it's output with export display ...
2
votes
2answers
557 views

Working with git via crontab

I have the following shell script #!/bin/bash REPODIR=$HOME/work/repository/ cd $REPODIR var=`git fetch --dry-run 2>&1` echo $var > $HOME/error.txt I want to run my script every minute, ...
0
votes
3answers
534 views

Shell script works directly, but has a syntax error via crontab

I have a shell script to automate a git commit and push every night: auto_git_push.sh #!/bin/sh function automate(){ git add . git commit -am "automated push $(date +"%Y-%m-%d")" git ...
0
votes
3answers
2k views

Load login shell inside user cronjob

I'm trying to run a rake task using a scheduled cronjob. My crontab looks something like this: 0 1 * * 1-7 /bin/bash -l -c "cd ~/jobs/rake && rake reports:create >> ...
0
votes
1answer
205 views

crontab -l output to file

I want to be able to output my current crontab to a file, in order to check and append it automatically. crontab -l > somefile creates an empty file. There must be a simple way of doing this, ...
1
vote
1answer
7k views

Crontab script on Mac OS X Lion does not work anymore

I have a problem with cron tasks. Previously this script worked fine on Mac OS X 10.6 server, but when I initialize it on Lion (client), this script stopped working. Basically, this .bat file calls ...
3
votes
4answers
723 views

How do I add a job to cron?

So, here's what I did: Logged in as root via Shell Typed crontab -e Typed */30 * * * * /path_to_website/cronjobs/cron.php And now what? How do I save it? I just closed Putty and then logged back ...
0
votes
0answers
422 views

user crontabs don't work, only /etc/crontab

Hi when I use the command crontab -e to set up cron, the commands get triggered (according to syslog) but nothing happens. Also if I run sudo crontab -e. The only way to actually get cron working ...
2
votes
2answers
1k views

stdout and stderr of script doesn't get redirected when executed by cron

./script &>> log.txt I get a nice logfile, but if I have the same command executed by cron, lets say the crontab looks like this: * * * * * '/home/user/script &>> /home/user/log.txt' ...