Hello all. I'm trying to get cron to work. It isn't. I've created a very simple cron script, to simply run gvim (as an example). When I am done , I see where the new crontab is installed, it is just the command never executes. I've searched for an answer to this, and other than a web page that describes some possilbe errors with formatting, I've found nothing. This is runnin on a SuSE 8.1 box. Any help? nicki > crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.24474 installed on Tue Mar 4 19:01:34 2003) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) 02 19 * * * gvim
* Timothy (treaves@silverfields.com) [030304 16:18]:
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) 02 19 * * * gvim
The shell that's running this doesn't have a terminal attached (much less an X display), it can't work. What exactly are you trying to do? -- -ckm
On Tue, 4 Mar 2003 16:28:23 -0800
Christopher Mahmood
* Timothy (treaves@silverfields.com) [030304 16:18]:
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) 02 19 * * * gvim
The shell that's running this doesn't have a terminal attached (much less an X display), it can't work.
What exactly are you trying to do?
I'm trying to get a wget script to run. I tried the gvim simply to see if it was executing. I get no mail, not output, no nothing (with either the wget or gvim).
* Timothy (treaves@silverfields.com) [030304 16:41]:
What exactly are you trying to do?
I'm trying to get a wget script to run. I tried the gvim simply to see if it was executing. I get no mail, not output, no nothing (with either the wget or gvim).
You may not have cron running. As root, run rccron status to see. If you get 'unused' start it with rccron start and run insserv cron so that it starts at boot next time. In any case, gvim probably isn't the best program to test cron with. You might want to try /bin/date -- if it's working you'll get a mail from cron with the output of date. -- -ckm
On Tuesday 04 March 2003 16:44, Timothy wrote:
* Timothy (treaves@silverfields.com) [030304 16:18]:
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) 02 19 * * * gvim
The shell that's running this doesn't have a terminal attached (much less an X display), it can't work.
What exactly are you trying to do?
I'm trying to get a wget script to run. I tried the gvim simply to see if it was executing. I get no mail, not output, no nothing (with either the wget or gvim).
Is cron even configured to run? Check to see if /etc/init.d/rc5.d/S12cron exists. If not, link it to /etc/init.d/cron. brian -- Brian Jackson Photo http://www.brianjacksonphoto.com Action Athletics "Sports Photography for You" http://www.actionathletics.com
to test cron make it touch a file in /tmp
* * * * * touch /tmp/mycron.test
Then in a minute you should have /tmp/mycron.test with the current timestamp
----- Original Message -----
From: "Timothy"
On Tue, 4 Mar 2003 16:28:23 -0800 Christopher Mahmood
wrote: * Timothy (treaves@silverfields.com) [030304 16:18]:
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) 02 19 * * * gvim
The shell that's running this doesn't have a terminal attached (much less an X display), it can't work.
What exactly are you trying to do?
I'm trying to get a wget script to run. I tried the gvim simply to see if it was executing. I get no mail, not output, no nothing (with either the wget or gvim).
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
I'm sorry, I should have stated that I did the obvious of insuring cron
was running, that cron's deny / allow file to not prevent it, of looking
for e-mailed output, etc, etc. No e-mail is generated, even when
environment is set properly, and what not. Yes, I even tried teh
directives in the crontab file itself.
As to the command below, it produces nothing.
nicki > crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.24742 installed on Tue Mar 4 20:53:01 2003)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
* * * * * touch /tmp/mycron.test
On Wed, 5 Mar 2003 11:58:35 +1100
"Paul"
to test cron make it touch a file in /tmp
* * * * * touch /tmp/mycron.test
Then in a minute you should have /tmp/mycron.test with the current timestamp
----- Original Message ----- From: "Timothy"
To: Sent: Wednesday, March 05, 2003 11:44 AM Subject: [SLE] Re: [read] Re: [SLE] Help with cron, please... On Tue, 4 Mar 2003 16:28:23 -0800 Christopher Mahmood
wrote: * Timothy (treaves@silverfields.com) [030304 16:18]:
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp$) 02 19 * * * gvim
The shell that's running this doesn't have a terminal attached (much less an X display), it can't work.
What exactly are you trying to do?
I'm trying to get a wget script to run. I tried the gvim simply to see if it was executing. I get no mail, not output, no nothing (with either the wget or gvim).
I'm sorry, I should have stated that I did the obvious of insuring cron
was running, that cron's deny / allow file to not prevent it, of looking
for e-mailed output, etc, etc. No e-mail is generated, even when
environment is set properly, and what not. Yes, I even tried teh
directives in the crontab file itself.
As to the command below, it produces nothing.
nicki > crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.24742 installed on Tue Mar 4 20:53:01 2003)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
* * * * * touch /tmp/mycron.test
On Wed, 5 Mar 2003 11:58:35 +1100
"Paul"
to test cron make it touch a file in /tmp
* * * * * touch /tmp/mycron.test
Then in a minute you should have /tmp/mycron.test with the current timestamp
----- Original Message ----- From: "Timothy"
To: Sent: Wednesday, March 05, 2003 11:44 AM Subject: [SLE] Re: [read] Re: [SLE] Help with cron, please... On Tue, 4 Mar 2003 16:28:23 -0800 Christopher Mahmood
wrote: * Timothy (treaves@silverfields.com) [030304 16:18]:
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp$) 02 19 * * * gvim
The shell that's running this doesn't have a terminal attached (much less an X display), it can't work.
What exactly are you trying to do?
I'm trying to get a wget script to run. I tried the gvim simply to see if it was executing. I get no mail, not output, no nothing (with either the wget or gvim).
On Wednesday 05 March 2003 01:21, Timothy wrote:
Hello all. I'm trying to get cron to work. It isn't.
I've created a very simple cron script, to simply run gvim (as an example). When I am done , I see where the new crontab is installed, it is just the command never executes. I've searched for an answer to this, and other than a web page that describes some possilbe errors with formatting, I've found nothing.
You should check your local mailbox. cron has most likely sent you a mail explaining what is going wrong.
This is runnin on a SuSE 8.1 box. Any help?
nicki > crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.24474 installed on Tue Mar 4 19:01:34 2003) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) 02 19 * * * gvim
I can see two problems here. First of all you have a very limited $PATH when you run cron jobs, so you should give the full path to the command. In the case of gvim that would be /usr/X11R6/bin/gvim Secondly, you don't have very many environment variables set at all in a cron job, so running graphical programs will fail unless you tell them were to display their windows. If you really want to run the above cron script, do something like 2 19 * * * /usr/X11R6/bin/gvim -display :0.0 Anders
participants (5)
-
Anders Johansson
-
brian jackson
-
Christopher Mahmood
-
Paul
-
Timothy