LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Screwed Up Cron and Disk Size Problems (https://www.linuxquestions.org/questions/linux-software-2/screwed-up-cron-and-disk-size-problems-46916/)

dancemutha 02-24-2003 11:17 AM

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.

Tinkster 02-24-2003 01:31 PM

As for cron jobs...

use
Code:

crontab -e <username>
to edit them, even though I hate vi :}

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

dancemutha 02-24-2003 01:50 PM

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.

Tinkster 02-24-2003 02:14 PM

Code:

man crontab
It is wrong to assume that only
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

dancemutha 02-24-2003 02:20 PM

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.