[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: hourly cron jobs....



Brad,
   Hi. Thanks for helping. My answers:

1) Yes, if I execute the command (minus the 0 * * * * part) that I put in
the crontab -e file by hand seti home does start and run just fine. My
understanding of the 0 * * * * part is that tells crond to start this at the
0 minute of each hour.

2) When closing crontab -e (vi, Esc:wq enter) I get the message:

crontab: Installing new crontab

   After that, no messages. If I wait for the next top of the hour, it
doesn't start, and if I reboot it doesn't start.

   What I determined yesterday was that file /var/spool/cron/root now has
the command that was put in using step one, and that the system should
execute all files in the /var/spool/cron directory, of which 'root' is the
only one on my machine. All indications are (so far) that it does not.
Here's what's running on my machine: (Sorry, it's going to wrap, right?)

[root RH73WO root]# ps -aux
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.3  1368  476 ?        S    11:33   0:06 init
root         2  0.0  0.0     0    0 ?        SW   11:33   0:00 [keventd]
root         3  0.0  0.0     0    0 ?        SW   11:33   0:00 [kapmd]
root         4  0.0  0.0     0    0 ?        SWN  11:33   0:00
[ksoftirqd_CPU0]
root         5  0.0  0.0     0    0 ?        SW   11:33   0:00 [kswapd]
root         6  0.0  0.0     0    0 ?        SW   11:33   0:00 [bdflush]
root         7  0.0  0.0     0    0 ?        SW   11:33   0:00 [kupdated]
root         8  0.0  0.0     0    0 ?        SW<  11:33   0:00 [mdrecoveryd]
root        83  0.0  0.0     0    0 ?        SW   11:33   0:00 [khubd]
root       546  0.0  0.4  1428  568 ?        S    11:34   0:00 syslogd -m 0
root       551  0.0  0.3  1364  440 ?        S    11:34   0:00 klogd -x
rpc        571  0.0  0.4  1508  536 ?        S    11:34   0:00 portmap
rpcuser    599  0.0  0.5  1560  704 ?        S    11:34   0:00 rpc.statd
root       759  0.0  0.7  2200  908 ?        S    11:34   0:00
xinetd -stayalive -reuse -pidfile /var/run/xinetd.pid
root       817  0.0  0.4  1556  616 ?        S    11:34   0:00 crond
xfs        871  0.0  2.6  4720 3412 ?        S    11:34   0:00
xfs -droppriv -daemon
daemon     907  0.0  0.4  1404  516 ?        S    11:34   0:00 /usr/sbin/atd
root       914  0.0  0.8  2272 1028 ?        S    11:34   0:00 login -- root
root       915  0.0  0.3  1344  396 tty2     S    11:34   0:00
/sbin/mingetty tty2
root       916  0.0  0.3  1344  396 tty3     S    11:34   0:00
/sbin/mingetty tty3
root       917  0.0  0.3  1344  396 tty4     S    11:34   0:00
/sbin/mingetty tty4
root       918  0.0  0.3  1344  396 tty5     S    11:34   0:00
/sbin/mingetty tty5
root       919  0.0  0.3  1344  396 tty6     S    11:34   0:00
/sbin/mingetty tty6
root       922  0.0  1.0  2504 1344 tty1     S    11:34   0:00 -bash
root       970  0.0  0.8  2232 1024 tty1     S    11:35   0:00 /bin/sh
/usr/X11R6/bin/startx
root       981  0.0  0.4  2276  600 tty1     S    11:35   0:00 xinit
/root/.xinitrc --
root       982  0.0  6.2 58960 7904 ?        S<   11:35   0:01 X :0
root       985  0.0  1.5  3908 2004 tty1     S    11:35   0:00
/usr/local/bin/fluxbox
root      1102  0.0  3.0  6260 3836 ?        S    13:31   0:00 xterm
root      1104  0.0  1.1  2564 1404 pts/1    S    13:31   0:00 bash
root      1145  0.0  0.5  2724  756 pts/1    R    13:38   0:00 ps -aux
[root RH73WO root]#

Cheers,
Mark

-----Original Message-----
From: redhat-install-list-admin redhat com
[mailto:redhat-install-list-admin redhat com]On Behalf Of Mugleston,
Brad
Sent: Tuesday, September 24, 2002 11:45 AM
To: redhat-install-list redhat com
Subject: RE: hourly cron jobs....


I've done the same thing your looking to do and it works for me.  I have
some questions

1 - by doing what your putting into the crontab by hand
cd /root/seti
./setiathome -nice 19

Does Seti start running?

2 - when you exit and save the crontab do you get a message that it's
re-written and started (don't remember what it says but it is something like
that).

Here is what I remember.  As root

crontab -e

pulls up a file using vi

edit the file,  make sure no typos then ESC : wq and enter.

You should get a message indicating that crontab recognized your changes and
started the process.

Let me know - it works great for me.

Brad


-----Original Message-----
From: Mark Knecht [mailto:markknecht attbi com]
Sent: Monday, September 23, 2002 6:53 PM
To: redhat-install-list redhat com
Subject: RE: hourly cron jobs....


Rick & Walter,
   Thanks for the tips. From everything I can tell the crontab command is
the right way to do it, but the job still doesn't start.

   crontab -e creates a file in /var/spool/root (I think that was the
directory...) which has the job information in it. Just the command I listed
earlier and nothing else except instructions not to modify the file. From
what I can tell crond, or anacron possibly, is supposed to look at all the
names in the password file and start cron jobs, and root should always have
the right to do it anyway.

   I've rebooted the machine, tried starting and stopping crond, etc., but
nothing I do actually gets the job started.

   I also looked at doing this by putting a file in /etc/cron.hourly. I
copied one that was in cron.monthly and modified it's contents, but that
doesn't start either.

   I think I'm must just be missing some simple point, or else possibly have
turned off something that's required with ntsysv. I normally turn off most
of the stuff that RH turns on, but cron jobs do run so I didn't think I'd
created a problem there.

   Anyway, thanks for the help getting this far. Experiments and ideas
warmly welcomed.

Regards,
Mark

-----Original Message-----
From: redhat-install-list-admin redhat com
[mailto:redhat-install-list-admin redhat com]On Behalf Of Rick Stevens
Sent: Monday, September 23, 2002 11:46 AM
To: redhat-install-list redhat com
Subject: Re: hourly cron jobs....


Mark Knecht wrote:
> Hi,
>    I wanted to start Seti Home on an hourly basis should it not be
running.
> The Seti Home page said to add the following line to /etc/crontab
>
> 0 * * * * cd <setidir>; ./setiathome -nice 19 > /dev/null 2> /dev/null
>
> where <setidir> is replaced by the directory where setiathome is
installed.
> So I added this:
>
> 0 * * * * cd /root/seti; ./setiathome -nice 19 > /dev/null 2> /dev/null
>
> but it does nothing after the start of the hour. I looked at /var/log/cron
> and could see that Linux did attempt to run cron.hourly, but there is
> nothing in that directory for it to run. I also rebooted, but it didn't
> start up that way either.
>
>    I need a book on cron, I suppose, but in the short term does anyone
know
> how to get this going under RH 7.3?

Do you want it to run as the root user?  If so, log in as root and
just use "crontab -e" to edit root's crontab.

----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens vitalstream com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-     Make it idiot proof and someone will make a better idiot.      -
----------------------------------------------------------------------



_______________________________________________
Redhat-install-list mailing list
Redhat-install-list redhat com
https://listman.redhat.com/mailman/listinfo/redhat-install-list



_______________________________________________
Redhat-install-list mailing list
Redhat-install-list redhat com
https://listman.redhat.com/mailman/listinfo/redhat-install-list



_______________________________________________
Redhat-install-list mailing list
Redhat-install-list redhat com
https://listman.redhat.com/mailman/listinfo/redhat-install-list






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]