-1
votes
2answers
28 views

What is the risk when editing crontab file without the “crontab -e” command?

I developed a script in which I add lines to the crontab file with echo command and I remove lines with sed command. I do not know the risk of that especially that I find in some web site that we ...
0
votes
1answer
41 views

Check shell Script copy Status

I have a cron script and i need to adjust it; Actually some clients are generating in a directory some files, my task is to backup that files to a tape, and i need to make a if then else cp $files ...
0
votes
1answer
74 views

Shell script truncated when run from cron or at

I'm seeing some very strange behavior on a Linux based NAS (DNS-323) I have. I'm using a simple shell script to back up the files on the NAS to another box. After making some recent additions, the ...
1
vote
0answers
52 views

Cron deamon written in shell

I'm looking for a script in bash or ksh, that would do ... more or less ... the same as crond. The situation is, that our system administrator suddenly denied the use of crontab to all regular users ...
3
votes
2answers
607 views

Shell script running from cron not running python

I have python program, I want to run it everyday with different variable (on CentOS server): #!/bin/sh /usr/bin/python /root/testing/test.py --variables /root/testing/daily/test1.txt while [ $? != 0 ...
0
votes
3answers
759 views

How to schedule/unschedule cron job from shell

I have a ubuntu server where I put my application core. It's a jar that needs to be always listening for requests. I made a script to run it with the correct parameters. The scenario is similar to ...
0
votes
1answer
923 views

ntpdate command not found [only when using with cron]

I have a linux machine with ntpdate installed and it is working when i run it from my ssh terminal or from a shell script manually. However , when i add the shell script to crontab i get the error ...
2
votes
2answers
577 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
1answer
152 views

How do I run a shell script with export command in crontab?

I have a shell script that exports values of variables when executed. The same values will be used in another script. #!/bin/sh export I="10" echo $I I will be using root access for cron. I ...
0
votes
1answer
145 views

Getting fcron and RVM work together

I'm trying to make RVM and fcron work together. Apparently fcron does not read directly or indirectly any sort of env variables. Which makes RVM futile and scripts fail. I have this script which ...
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
727 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
1answer
857 views

ImageMagick's “import” command line program failing to take a screenshot from CRON script

Hello I wrote a simple command line script which is suppose to take my screenshot every 5 minutes. (using ImageMagick's "import" program) here is the script (shottr.sh): #!/bin/sh ...
4
votes
2answers
2k views

Bash to delete a files older than X days

So I have a cron setup to make backups of a folder into a tarball every hour. I would like to add into the shell script that I'm using the ability to have files deleted automagically after about three ...
0
votes
0answers
423 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' ...
3
votes
2answers
6k views

How can I add a timestamp to the end of a cron job's output file name?

I want to track each crontab output to separated file. Normally, I use this as crontab entry: 1 * * * * root php /mix/dostuff.php > /tmp/dostuff.txt Now, I want to make it to write ...