Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have several scripts in a directory to get data via ftp and wget. I have these set up in crontab, under the username gempak.
One night, the crons suddenly stopped working. I can run the scripts manually, and when I cut and paste the full path from crontab into another xterm, it works.
I am outputting logs for each of these scripts. The funny thing is, the time stamp on these logs update and change at the approprate time...only problem is, the scripts are not being run and the log sizes are always 0. I have set permissions to 777, and even tried chown crontab to my username. If I su to root and look at /etc/crontab, it is blank...do I need to change this crontab?
I was making directories the same night, nothing anywhere critical, just some subdirectories in my user account. I accidentally typed "mdir" instead of "mkdir", and my hard drive thrashed for a couple minutes. Not sure what it was doing, or if it has anything to do with why my crons will not run.
Here's an example from my "System logs" window:
Feb 17 03:54:01 localhost crond: (gempak) CMD (/home/gempak/GEMPAK5.7.4/scripts/getdata/rad >/tmp/rad.log)
There are no funny symbols, so it appears to have run...however, there is no new data in the directory (this cron downloads radar data). I can run this manually and it will work.
Anybody know why the crons will not run? It does not make any sense to me. Thanks,
Last edited by corepuncher; 02-17-2005 at 09:31 AM.
See "man mdir": it probably searched for msdos files or something. Maybe I'm wrong, but I don't see how it could affect crontab.
Since the cron jobs ran normally before, I can also see no reason why it should suddenly stop working like that. Nonetheless, maybe you could try editing root's crontab with "crontab -e root" and adding the jobs there.
Hope that helps.
I copied my crontab into the root crontab, and it still does not work. Same old thing...the time comes for the cron to run, the scripts do not run, but the log files time stamp updates as if the cron runs, with nothing written to the log files. I even tried tying -v at the top of the script and tried >1 and >2.
Could this have anything to do with PATH variable? Something to do with login scripts or something? I'd hate to erase my hard drive for this.
It all came down to a file that I source in csh.login. This file, defines several environmental variables which my scripts (run by crontab) depend on .
What happened is that I added a new variable the other day, which depended upon a variable yet to be defined (it was defined AFTER the variable I was setting), so the whole thing crashes. I moved my setenv <variable> down a couple lines , and now it all works!