Hi I have tried to get a program to work via crontab...trouble is something is going wrong and for some reason the program is not being called. I have executed the program in question via the command line so I suspect it is something to do with environment variables. Does anyone know if either crontab produces an error log or if I can debug what it is doing? I am using SuSE 7.2. Dan
On Tue, May 21, 2002 at 01:05:53PM +1000, dan wrote:
Hi
I have tried to get a program to work via crontab...trouble is something is going wrong and for some reason the program is not being called. I have executed the program in question via the command line so I suspect it is something to do with environment variables.
Does anyone know if either crontab produces an error log or if I can debug what it is doing?
Jobs run from crontab don't have the path set up the same as jobs run from a shell. You probably need to fully-qualify the program name. -- Robert C. Paulsen, Jr. robert@paulsenonline.net
Sorry should have told you that I used the full path for everything and it
is still not working - is there a way of making sure the commands you use in
crontab will work i.e. could I set all the env variable to null and try
manually typing the command?
Dan
----- Original Message -----
From: "Robert C. Paulsen Jr."
On Tue, May 21, 2002 at 01:05:53PM +1000, dan wrote:
Hi
I have tried to get a program to work via crontab...trouble is something is going wrong and for some reason the program is not being called. I have executed the program in question via the command line so I suspect it is something to do with environment variables.
Does anyone know if either crontab produces an error log or if I can debug what it is doing?
Jobs run from crontab don't have the path set up the same as jobs run from a shell. You probably need to fully-qualify the program name.
-- Robert C. Paulsen, Jr. robert@paulsenonline.net
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com
* dan (dan@edentify.com.au) [020520 20:23]:
Sorry should have told you that I used the full path for everything and it is still not working - is there a way of making sure the commands you use in crontab will work i.e. could I set all the env variable to null and try manually typing the command?
You may want to just drop you script into /etc/cron.daily, /etc/cron.hourly, etc. -- -ckm
I'm not sure if this has been beaten to death, but I use cron both on my home desktop system (SuSE 7.3), my laptop (SuSE 8.0), and the blu.org server (RH 7.2), and work (Tru64 Unix). First, I keep a copy of my crontab files in a local directory. Then I run the crontab file to install them. crontab mycrontab Then I run crontab -l to check it. The other thing is that you should make sure that your scripts all have the appropriate execute permission. I always test my scripts by inserting echoes on dangerous lines, and set up a reasonable close time just so I can make sure the script will work to some extent. (I usually test the production script manually also). On 21 May 2002 at 13:17, dan wrote:
Sorry should have told you that I used the full path for everything and it is still not working - is there a way of making sure the commands you use in crontab will work i.e. could I set all the env variable to null and try manually typing the command?
-- Jerry Feldman Enterprise Systems Group Hewlett-Packard Company 200 Forest Street MRO1-3/F1 Marlboro, Ma. 01752 508-467-4315 http://www.testdrive.compaq.com/linux/
On Tue, 21 May 2002 13:05:53 +1000
"dan"
Does anyone know if either crontab produces an error log or if I can debug what it is doing?
Mail should have been sent to root (actually it is controlled by the MAILTO variable in the crontab file) after the job is done complete with error messages. If you didn't receive anything then some how the job didn't run. Can you post the crontab entry? Charles -- "Problem solving under linux has never been the circus that it is under AIX." (By Pete Ehlke in comp.unix.aix)
* Charles Philip Chan (cpchan@sympatico.ca) [020520 20:58]:
First of all did you do a
rccron restart
after editing the crontab?
You don't need to restart cron after editing the crontab or /etc/cron.d files. Otherwise users wouldn't be able to add cronjobs. -- -ckm
On Mon, 20 May 2002 21:27:43 -0700
Christopher Mahmood
You don't need to restart cron after editing the crontab or /etc/cron.d files. Otherwise users wouldn't be able to add cronjobs.
This is what I thought also (this is with the main crontab file in /etc), Until I found out I had a few new jobs that I put into it not starting until I restarted cron. Charles -- I did this 'cause Linux gives me a woody. It doesn't generate revenue. (Dave '-ddt->` Taylor, announcing DOOM for Linux)
You don't need to Cc me, I'm subscribed to the list. * Charles Philip Chan (cpchan@sympatico.ca) [020520 21:44]:
This is what I thought also (this is with the main crontab file in /etc), Until I found out I had a few new jobs that I put into it not starting until I restarted cron.
crond checks the modtime on etc/crontab and /etc/cron.d every minute. -- -ckm
On Tue, 21 May 2002, Christopher Mahmood wrote:
crond checks the modtime on etc/crontab and /etc/cron.d every minute.
Where, please, is the correct place to write ones 'cron' preferences ? { until now, i have edited : /var/cron/tabs/rootcron , and, then executed : "crontab rootcron" } thank you. best wishes ____________ sent on Linux ____________
* tabanna (tabanna@aig.forthnet.gr) [020520 23:43]:
Where, please, is the correct place to write ones 'cron' preferences ?
{ until now, i have edited :
/var/cron/tabs/rootcron
, and, then executed : "crontab rootcron" }
That's one way to do it. Another is to just run 'crontab -e'. -- -ckm
Personally I use a small GUI called tkcron. I think that the version is tkcron-2.11, and it's fine for me. This implies that you run an X server. HTH - regards. -----Message d'origine----- De : Christopher Mahmood [mailto:ckm@suse.com] Envoye : mardi 21 mai 2002 20:06 A : suse-linux-e@suse.com Objet : Re: [SLE] checking crontab.... * tabanna (tabanna@aig.forthnet.gr) [020520 23:43]:
Where, please, is the correct place to write ones 'cron' preferences ?
{ until now, i have edited :
/var/cron/tabs/rootcron
, and, then executed : "crontab rootcron" }
That's one way to do it. Another is to just run 'crontab -e'. -- -ckm -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com
On Tue, 21 May 2002, dan wrote:
I have tried to get a program to work via crontab ...trouble is something is going wrong
maybe, write a small script, in /root directory. script is to execute program. get cron to call your script? best wishes ____________ sent on Linux ____________
participants (7)
-
Charles Philip Chan
-
Christopher Mahmood
-
dan
-
Jerry Feldman
-
Pascal Miquet
-
Robert C. Paulsen Jr.
-
tabanna