crontab doesn't work, but everything is set correctly
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.
Here is an example of my crontab file to send an email of my ~/tmp directory to my email everday at 5:10pm. Make sure your using 24hr time. cron seems correct just test the program path before adding to crontab.
Originally posted by kencaz Here is an example of my crontab file to send an email of my ~/tmp directory to my email everday at 5:10pm. Make sure your using 24hr time. cron seems correct just test the program path before adding to crontab.
1: Is the cron daemon running?
2: What does your system log say? It's probably got tons of crap in there... try to grep out your script name in the system log.
3: Remember that cron will have a different environment than you, or even the "at -f" command. It's very likely it's running, but something isn't working right.
Also, the easy way to find out if cron is running is to follow IBall's advice with a cheesy little script.
Last edited by GaijinPunch; 06-16-2005 at 02:15 AM.
Distribution: OpenBSD, Solaris, Red Hat, Ubuntu, OS X, HP-UX, Tru64
You could mod the script so you get output then change the start times to be every minute or every 5 minutes. Redirect the output to /tmp/output. It doesn't guarentee that it'll work at the specified times, but you'll know you don't have a problem with the script or a default environment issue.
the prog i was trying to run is really a script that uses java at one point. But since crontab just spawns a new job to handle the program, without setting up the environment in any way, the PATH wasn't set correctly and java wasn't been able to run.
The solution was to do:
xx xx * * mon-fri bash -l bla
so that i run bash in login mode and the environment gets setup correctly.