Screwed Up Cron and Disk Size Problems
The other day I wrote a shell script that uses ncftpget to pull down a backup of our live server to a development server in house. I wanted to add this script to my crontab so I simply copied it to my /etc/cron.daily directory and changed the crontab file to execute daily scripts everyday at 11pm. Since I made this change, 2 minutes after every hour I get mail in /var/spool/mail/root from cron stating that /bin/bash is an unrecognized shell command. In my /etc/cron.hourly directory there is nothing. The crontab that is installed indicates that nothing should be executing at 2 minutes after ther hour. Could someone help me out with this problem? Any advice as to how to stop this would be greatly appreciated.
I have a second problem as well. My backup script is executing fine, but wont download the complete file. Our server admin creates a tarball of our server everynight that I can download with my backup script. It executes fine via cron and connects with no problem, but only downloads 300 mb of the backup file that is about 1 gb. When I use the -d option with ncftpget I see the error "Local write failed: No space left on device". How could this be. I'm downloading to my /home directory which show the below capacity from df: Filesystem Size Used Avail Use% Mounted on /dev/hda3 9.5G 1.1G 7.9G 12% /home What's going on here? Sorry for the long post, but I need to get these problems solved. I look forward to hearing anyones advice. |
As for cron jobs...
use Code:
crontab -e <username> as for the bash ... maybe you didn't make your script chmod +x for the user that the cron job runs under? As for the space ... Maybe you have disk-quotas enabled, and are running out of your "personal allowance"? Cheers, Tink |
How do I check to see if i have disk-quotas enabled? The cron problem isn't my script. It is something occuring in the /etc/cron.hourly directory, even though it's empty. My script works fine with the exception of the disk size problem. I need to know how to fix these 2 different problems. I don't think they are related at all.
|
Code:
man crontab stuff you put into cron.hourly is going to execute every hour. Use crontab, and familiarize yourself with its syntax. The directory structure is just a thing of convenience but doesn't save you from trying to understand what cron actually does. Telling us your distro might help in getting more to the point answers, by the way :} Cheers, Tink |
I'm using Red Hat 7.3...sorry for not mentioning that previously.
|
All times are GMT -5. The time now is 04:29 PM. |