Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Reboot incrontab
@ 2001-08-07  9:12 Peter Bech
  2001-08-07  9:23 ` Gregor Maier
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Bech @ 2001-08-07  9:12 UTC (permalink / raw)
  To: axp-list

[-- Attachment #1: Body --]
[-- Type: text/plain, Size: 780 bytes --]

Hi,

I'm trying to do a reboot in crontab at a specific time. Nothing happens, not 
even an entry in /var/log/cron, nor any other messages, nor mail to root nor 
nothing. It's simply ignored.

Allso tried to lure cron and specifiy a shell script doing. Still complete 
ignoring.

Is cron testing for rebooting? If yes, what the to do if you want it?

Heres is the crontab line:

0 7 * * * root /backup/reboot.sh >/backup/reboot.log

Rgds
Peter Bech
Informi A/S
------------------------------------------------------------
Open Systems Hardware and Software Consultants
Applix - Linux - Unix - OpenVMS - Alpha Systems
Phone (+45): 4593 7666 Fax: 4593 6335 Mob: 4087 7601
Web: www.informi.com  (Private: www.efk87.dk)
------------------------------------------------------------




^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Reboot incrontab
  2001-08-07  9:12 Peter Bech
@ 2001-08-07  9:23 ` Gregor Maier
  0 siblings, 0 replies; 15+ messages in thread
From: Gregor Maier @ 2001-08-07  9:23 UTC (permalink / raw)
  To: axp-list

On 07-Aug-2001 Peter Bech wrote:
> Hi,
> 
> I'm trying to do a reboot in crontab at a specific time. Nothing happens, not
> even an entry in /var/log/cron, nor any other messages, nor mail to root nor 
> nothing. It's simply ignored.
> 
> Allso tried to lure cron and specifiy a shell script doing. Still complete 
> ignoring.
> 
> Is cron testing for rebooting? If yes, what the to do if you want it?
> 
> Heres is the crontab line:
> 
> 0 7 * * * root /backup/reboot.sh >/backup/reboot.log
> 
Are you sure that crond is running?
Is this your /etc/crontab file or did you use the crontab -e command (in which
case you can't add the user field)
Maybe you must add the PATH to the shutdown programm in your crontab and/or the
shell in which.


Gregor

----------------------------------
E-Mail: Gregor Maier <gregor.maier@newlogic.com>
Date: 07-Aug-2001
Time: 11:14:30
----------------------------------




^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Reboot incrontab
@ 2001-08-07 11:59 M. Osten
  2001-08-07 13:06 ` Gregor Maier
  0 siblings, 1 reply; 15+ messages in thread
From: M. Osten @ 2001-08-07 11:59 UTC (permalink / raw)
  To: axp-list, axp-list



> > 
> > 0 7 * * * root /backup/reboot.sh >/backup/reboot.log

You do not need "root" before the script.  Your box is seeing that, not
understanding it, and ignoring the rest of the line.  Just make sure
that your putting it in root's crontab.

  . ---		
   |o_o |
   |:_/ |	Michael Osten
  //   \ \	mosten@reefedge.com
 (|     | )	Reefedge Inc.
/'\_   _/`\  
\___)=(___/




^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Reboot incrontab
  2001-08-07 11:59 Reboot incrontab M. Osten
@ 2001-08-07 13:06 ` Gregor Maier
  2001-08-07 13:32   ` Peter Bech
  0 siblings, 1 reply; 15+ messages in thread
From: Gregor Maier @ 2001-08-07 13:06 UTC (permalink / raw)
  To: axp-list

On 07-Aug-2001 M. Osten wrote:
> 
> 
> 
>> > 
>> > 0 7 * * * root /backup/reboot.sh >/backup/reboot.log
> 
> You do not need "root" before the script.  Your box is seeing that, not
> understanding it, and ignoring the rest of the line.  Just make sure
> that your putting it in root's crontab.
 
If he's using the system wide crontab (/etc/crontab or files in /etc/cron.d)
then the root is needed. This crontab(s) have an additional user field so the
syntax is correct.

But putting it in roots crontab would work (use crontab -e and enter the line
without "root".)

Gregor
----------------------------------
E-Mail: Gregor Maier <gregor.maier@newlogic.com>
Date: 07-Aug-2001
Time: 15:04:09
----------------------------------




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: RE: Reboot incrontab
  2001-08-07 13:06 ` Gregor Maier
@ 2001-08-07 13:32   ` Peter Bech
  2001-08-07 13:40     ` Linus Gasser
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Bech @ 2001-08-07 13:32 UTC (permalink / raw)
  To: axp-list

[-- Attachment #1: Body --]
[-- Type: text/plain, Size: 1353 bytes --]

It's in the system crontab /etc/crontab. The other lines work fine.

Heres the whole lot:


SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
# Hent posten
# 05 0,3,6,9,10,11,12,13,14,15,16,17,18,21 * * * root /etc/hentpost.sh 
>/dev/null 2>/dev/null
3,12,21,39,46,57 * * * * root /etc/hentpost.sh >/dev/null 2>/dev/null
30 0 * * 0 root /backup/bak_week.sh >/backup/backup_week.log  2>/dev/null
#30 0 * * 3 root /backup/bak_wed.sh >/backup/backup_wed.log  2>/dev/null
# Reboot system
0 7 * * * root /backup/reboot.sh >/backup/reboot.log

All the other lines work except the last line. If there is an error in the 
line, I would suspect a messge somwhere. At least I would expect a log entry in 
/var/cron.

But could it be so simple, that I need a path to the "reboot" command? Or do I 
need the -f flag?

Peter Bech
Informi A/S
------------------------------------------------------------
Open Systems Hardware and Software Consultants
Applix - Linux - Unix - OpenVMS - Alpha Systems
Phone (+45): 4593 7666 Fax: 4593 6335 Mob: 4087 7601
Web: www.informi.com  (Private: www.efk87.dk)
------------------------------------------------------------




^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Reboot incrontab
@ 2001-08-07 13:35 M. Osten
  0 siblings, 0 replies; 15+ messages in thread
From: M. Osten @ 2001-08-07 13:35 UTC (permalink / raw)
  To: axp-list


 
> If he's using the system wide crontab (/etc/crontab or files in
/etc/cron.d)
> then the root is needed. This crontab(s) have an additional user field
so the
> syntax is correct.
> 
> But putting it in roots crontab would work (use crontab -e and enter
the line
> without "root".)
>

Your right...I never use the system wide.
  . ---		
   |o_o |
   |:_/ |	Michael Osten
  //   \ \	mosten@reefedge.com
 (|     | )	Reefedge Inc.
/'\_   _/`\  
\___)=(___/




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: RE: Reboot incrontab
  2001-08-07 13:32   ` Peter Bech
@ 2001-08-07 13:40     ` Linus Gasser
  2001-08-08  8:05       ` Re[2]: " Peter Bech
  0 siblings, 1 reply; 15+ messages in thread
From: Linus Gasser @ 2001-08-07 13:40 UTC (permalink / raw)
  To: axp-list

Hi,
ok, just my 2 cents: could it be that you're lacking a final CR? Just for the 
simplest, most stupid error possible ;-)

Ineiti

PS: And why, oh why, do you want to reboot your linux-machine once a day? I 
always thought this is just needed on Win* !?!

On Tuesday 07 August 2001 15:32, you wrote:
> It's in the system crontab /etc/crontab. The other lines work fine.
>
> Heres the whole lot:
>
>
> SHELL=/bin/bash
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> MAILTO=root
> HOME=/
>
> # run-parts
> 01 * * * * root run-parts /etc/cron.hourly
> 02 4 * * * root run-parts /etc/cron.daily
> 22 4 * * 0 root run-parts /etc/cron.weekly
> 42 4 1 * * root run-parts /etc/cron.monthly
> # Hent posten
> # 05 0,3,6,9,10,11,12,13,14,15,16,17,18,21 * * * root /etc/hentpost.sh
>
> >/dev/null 2>/dev/null
>
> 3,12,21,39,46,57 * * * * root /etc/hentpost.sh >/dev/null 2>/dev/null
> 30 0 * * 0 root /backup/bak_week.sh >/backup/backup_week.log  2>/dev/null
> #30 0 * * 3 root /backup/bak_wed.sh >/backup/backup_wed.log  2>/dev/null
> # Reboot system
> 0 7 * * * root /backup/reboot.sh >/backup/reboot.log




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re[2]: RE: Reboot incrontab
  2001-08-07 13:40     ` Linus Gasser
@ 2001-08-08  8:05       ` Peter Bech
  2001-08-08  8:38         ` Re[3]: " Peter Bech
                           ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Peter Bech @ 2001-08-08  8:05 UTC (permalink / raw)
  To: axp-list

[-- Attachment #1: Body --]
[-- Type: text/plain, Size: 979 bytes --]

Ineiti wrote:

>
PS: And why, oh why, do you want to reboot your linux-machine once a day? I 
always thought this is just needed on Win* !?!
>
I should answer you directly to avoid beinmg diculed, but it's because the 
clock is not running correctly on the DS10. Reboot adjusts it correctly.

I have seen at tip of "patching the harddisk driver" but frankly, I cannot 
figure out how. Every day, I manually readjust the clock, but when I'm note 
here, nobody else can. Therefore, reboot in cron was the obvious choice.

But else, I think you are right, there is no >CR> on the last line....How 
stupid, i'll se now if it works.

Regards
Peter Bech
Informi A/S
------------------------------------------------------------
Open Systems Hardware and Software Consultants
Applix - Linux - Unix - OpenVMS - Alpha Systems
Phone (+45): 4593 7666 Fax: 4593 6335 Mob: 4087 7601
Web: www.informi.com  (Private: www.efk87.dk)
------------------------------------------------------------




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re[3]: RE: Reboot incrontab
  2001-08-08  8:05       ` Re[2]: " Peter Bech
@ 2001-08-08  8:38         ` Peter Bech
  2001-08-08  8:43         ` Re[2]: " Danilo Godec
                           ` (3 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: Peter Bech @ 2001-08-08  8:38 UTC (permalink / raw)
  To: axp-list

[-- Attachment #1: Body --]
[-- Type: text/plain, Size: 601 bytes --]

Problem solved: The reboot line in crontab was ignored due to lack of <CR>.

I used the std KDE editor, this can obviously trick you to forget hitting <CR> 
because you can move the cursor around in the empty spaces as if there was 
something there.

Regards
Peter Bech
Informi A/S
------------------------------------------------------------
Open Systems Hardware and Software Consultants
Applix - Linux - Unix - OpenVMS - Alpha Systems
Phone (+45): 4593 7666 Fax: 4593 6335 Mob: 4087 7601
Web: www.informi.com  (Private: www.efk87.dk)
------------------------------------------------------------




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Re[2]: RE: Reboot incrontab
  2001-08-08  8:05       ` Re[2]: " Peter Bech
  2001-08-08  8:38         ` Re[3]: " Peter Bech
@ 2001-08-08  8:43         ` Danilo Godec
  2001-08-08 10:10         ` Helge Kreutzmann
                           ` (2 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: Danilo Godec @ 2001-08-08  8:43 UTC (permalink / raw)
  To: axp-list

On Wed, 8 Aug 2001, Peter Bech wrote:

> I should answer you directly to avoid beinmg diculed, but it's because the
> clock is not running correctly on the DS10. Reboot adjusts it correctly.

And why don't you use NTP (Network Time Protocol)?

  D.




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: RE: Reboot incrontab
  2001-08-08  8:05       ` Re[2]: " Peter Bech
  2001-08-08  8:38         ` Re[3]: " Peter Bech
  2001-08-08  8:43         ` Re[2]: " Danilo Godec
@ 2001-08-08 10:10         ` Helge Kreutzmann
  2001-08-08 10:44           ` Re[2]: " Peter Bech
  2001-08-08 10:15         ` Mike A. Harris
  2001-08-08 12:34         ` David Bremner
  4 siblings, 1 reply; 15+ messages in thread
From: Helge Kreutzmann @ 2001-08-08 10:10 UTC (permalink / raw)
  To: axp-list

[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]

Hello !
On Wed, Aug 08, 2001 at 10:05:21AM +0200, Peter Bech wrote:
> Ineiti wrote:
> I should answer you directly to avoid beinmg diculed, but it's because the 
> clock is not running correctly on the DS10. Reboot adjusts it correctly.

No need to reboot here. Simply add:
18 * * * *  /usr/sbin/ntpdate -s YourFavoriteTimeServer
in your crontab (i.e. as root crontab -e).

Either you set up a local time server (maybe you can get the german
radio signal and pick up a radio controlled clock and attach it to one
of your machines) or check out public time servers. Simply search for
it on google and you'll find sites like:

http://www.eecis.udel.edu/~mills/ntp/servers.html

with more information.

kreutzm@menkar:~[568] % rpm -qf /usr/sbin/ntpdate
xntp3-5.93-14
(on RH 6.2 Intel).

Regards

          Helge
-- 
Helge Kreutzmann, Dipl.-Phys.               Helge.Kreutzmann@itp.uni-hannover.de
         For gpg-key: finger kreutzm@rigel.itp.uni-hannover.de
    64bit GNU powered                  http://www.itp.uni-hannover.de/~kreutzm
       Help keep free software "libre": http://www.freepatents.org/

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re[2]: RE: Reboot incrontab
  2001-08-08  8:05       ` Re[2]: " Peter Bech
                           ` (2 preceding siblings ...)
  2001-08-08 10:10         ` Helge Kreutzmann
@ 2001-08-08 10:15         ` Mike A. Harris
  2001-08-08 12:34         ` David Bremner
  4 siblings, 0 replies; 15+ messages in thread
From: Mike A. Harris @ 2001-08-08 10:15 UTC (permalink / raw)
  To: axp-list

On Wed, 8 Aug 2001, Peter Bech wrote:

>PS: And why, oh why, do you want to reboot your linux-machine once a day? I 
>always thought this is just needed on Win* !?!
>>
>I should answer you directly to avoid beinmg diculed, but it's because the 
>clock is not running correctly on the DS10. Reboot adjusts it correctly.
>
>I have seen at tip of "patching the harddisk driver" but frankly, I cannot 
>figure out how. Every day, I manually readjust the clock, but when I'm note 
>here, nobody else can. Therefore, reboot in cron was the obvious choice.
>
>But else, I think you are right, there is no >CR> on the last line....How 
>stupid, i'll se now if it works.

man ntpdate



----------------------------------------------------------------------
Mike A. Harris                  Shipping/mailing address:
OS Systems Engineer             190 Pittsburgh Ave., Sault Ste. Marie,
XFree86 maintainer              Ontario, Canada, P6C 5B3
Red Hat Inc.                    Phone: (705)949-2136
http://www.redhat.com           ftp://people.redhat.com/mharris

Red Hat XFree86 mailing list:   xfree86-list@redhat.com
IRC:  #redhat-xfree86 on irc.openprojects.org
----------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re[2]: RE: Reboot incrontab
  2001-08-08 10:10         ` Helge Kreutzmann
@ 2001-08-08 10:44           ` Peter Bech
  2001-08-08 11:23             ` Mike A. Harris
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Bech @ 2001-08-08 10:44 UTC (permalink / raw)
  To: axp-list

[-- Attachment #1: Body --]
[-- Type: text/plain, Size: 433 bytes --]

Thanks, but ntpdate command is not on the system (RH 6.2 Alpha Linux) nor the 
man entry.

Peter Bech
Informi A/S
------------------------------------------------------------
Open Systems Hardware and Software Consultants
Applix - Linux - Unix - OpenVMS - Alpha Systems
Phone (+45): 4593 7666 Fax: 4593 6335 Mob: 4087 7601
Web: www.informi.com  (Private: www.efk87.dk)
------------------------------------------------------------




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re[2]: RE: Reboot incrontab
  2001-08-08 10:44           ` Re[2]: " Peter Bech
@ 2001-08-08 11:23             ` Mike A. Harris
  0 siblings, 0 replies; 15+ messages in thread
From: Mike A. Harris @ 2001-08-08 11:23 UTC (permalink / raw)
  To: axp-list

On Wed, 8 Aug 2001, Peter Bech wrote:

>Date: Wed, 8 Aug 2001 12:44:04 +0200
>From: Peter Bech <peterb@informi.com>
>To: axp-list@redhat.com
>Content-Type: text/plain; charset=us-ascii; name="Body"
>List-Id: Linux and Red Hat on Alpha processors <axp-list.redhat.com>
>Subject: Re[2]: RE: Reboot incrontab
>
>Thanks, but ntpdate command is not on the system (RH 6.2 Alpha Linux) nor the 
>man entry.

rpm -ivh /mnt/cdrom/RedHat/RPMS/ntp-4.0.99k-16.i386.rpm


----------------------------------------------------------------------
Mike A. Harris                  Shipping/mailing address:
OS Systems Engineer             190 Pittsburgh Ave., Sault Ste. Marie,
XFree86 maintainer              Ontario, Canada, P6C 5B3
Red Hat Inc.                    Phone: (705)949-2136
http://www.redhat.com           ftp://people.redhat.com/mharris

Red Hat XFree86 mailing list:   xfree86-list@redhat.com
IRC:  #redhat-xfree86 on irc.openprojects.org
----------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Re[2]: RE: Reboot incrontab
  2001-08-08  8:05       ` Re[2]: " Peter Bech
                           ` (3 preceding siblings ...)
  2001-08-08 10:15         ` Mike A. Harris
@ 2001-08-08 12:34         ` David Bremner
  4 siblings, 0 replies; 15+ messages in thread
From: David Bremner @ 2001-08-08 12:34 UTC (permalink / raw)
  To: axp-list

Can you run ntdp? This works great for me to keep a pile of DS10s with
the correct time.




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2001-08-08 12:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-07 11:59 Reboot incrontab M. Osten
2001-08-07 13:06 ` Gregor Maier
2001-08-07 13:32   ` Peter Bech
2001-08-07 13:40     ` Linus Gasser
2001-08-08  8:05       ` Re[2]: " Peter Bech
2001-08-08  8:38         ` Re[3]: " Peter Bech
2001-08-08  8:43         ` Re[2]: " Danilo Godec
2001-08-08 10:10         ` Helge Kreutzmann
2001-08-08 10:44           ` Re[2]: " Peter Bech
2001-08-08 11:23             ` Mike A. Harris
2001-08-08 10:15         ` Mike A. Harris
2001-08-08 12:34         ` David Bremner
  -- strict thread matches above, loose matches on Subject: below --
2001-08-07 13:35 M. Osten
2001-08-07  9:12 Peter Bech
2001-08-07  9:23 ` Gregor Maier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox