Unix Technical Forum

How to create a CRON entry that will shutdown my server at 1AM everyday.

This is a discussion on How to create a CRON entry that will shutdown my server at 1AM everyday. within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hello there! Fellow comp.unix.aix group members, I would like to know how can I put a cron entry that ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 09:37 AM
Chris
 
Posts: n/a
Default How to create a CRON entry that will shutdown my server at 1AM everyday.

Hello there!

Fellow comp.unix.aix group members, I would like to know how can I put
a cron entry that will issue a shutdown -Fr everyday at 1am. What file
do I have to edit or lines that I have to change. Can you please
enumerate the steps.

Thanks again!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 09:37 AM
Laurenz Albe
 
Posts: n/a
Default Re: How to create a CRON entry that will shutdown my server at 1AM everyday.

Chris <chris@netdesigns.com.ph> wrote:
> Fellow comp.unix.aix group members, I would like to know how can I put
> a cron entry that will issue a shutdown -Fr everyday at 1am. What file
> do I have to edit or lines that I have to change. Can you please
> enumerate the steps.


I think it is better for you to read the documentation and understand
what you are doing than to follow a cookbook some cook posts for you,
thereby maybe messing up your machine.

Read the man page for crontab and use 'crontab -e' to edit your crontab.

The crontab line should start with '* 1 * * *', I think :^)

Yours,
Laurenz Albe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 09:37 AM
Anunay
 
Posts: n/a
Default Re: How to create a CRON entry that will shutdown my server at 1AM everyday.

00 1 * * * /sbin/shutdown -Fr 01:00

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2008, 09:38 AM
Claudiu Costin
 
Posts: n/a
Default Re: How to create a CRON entry that will shutdown my server at 1AMeveryday.

Laurenz Albe wrote:
> Chris <chris@netdesigns.com.ph> wrote:
>> Fellow comp.unix.aix group members, I would like to know how can I put
>> a cron entry that will issue a shutdown -Fr everyday at 1am. What file
>> do I have to edit or lines that I have to change. Can you please
>> enumerate the steps.

>
> I think it is better for you to read the documentation and understand
> what you are doing than to follow a cookbook some cook posts for you,
> thereby maybe messing up your machine.
>
> Read the man page for crontab and use 'crontab -e' to edit your crontab.
>
> The crontab line should start with '* 1 * * *', I think :^)

Nope 8-)
0 1 * * * /your/path/to/shutdown -Fr

>
> Yours,
> Laurenz Albe


Claudiu
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-05-2008, 09:40 AM
Briantb
 
Posts: n/a
Default Re: How to create a CRON entry that will shutdown my server at 1AM everyday.

You sure you want to do this?
Are you really sure?

Why should you not do this -- let me count the ways:
Someone is going to be running some process one morning
and you're going to clobber it.
The crontab has another entry for 1:00 AM and you're going
to clobber that.
One evening, there will be an emergency software restore running
and you'll clobber that.

I keep saying "you''ll" clobber it because once it's discovered
what happened, it will be your neck in the noose.

The servers aren't PCs running Windows that constantly need
to be rebooted. I work in a shop that includes about 100 IBM servers.
Many of them have been up for months -- one for several years --
without a reboot. If you're using reboot to fix something screwy
going on, I'd track down the problem and get it fixed.

An auto-reboot makes me shiver just thinking of it.

On Fri, 03 Feb 2006 20:07:14 +0200, Claudiu Costin
<claudiu.costin@orange.ro> wrote:

>Laurenz Albe wrote:
>> Chris <chris@netdesigns.com.ph> wrote:
>>> Fellow comp.unix.aix group members, I would like to know how can I put
>>> a cron entry that will issue a shutdown -Fr everyday at 1am. What file
>>> do I have to edit or lines that I have to change. Can you please
>>> enumerate the steps.

>>
>> I think it is better for you to read the documentation and understand
>> what you are doing than to follow a cookbook some cook posts for you,
>> thereby maybe messing up your machine.
>>
>> Read the man page for crontab and use 'crontab -e' to edit your crontab.
>>
>> The crontab line should start with '* 1 * * *', I think :^)

> Nope 8-)
>0 1 * * * /your/path/to/shutdown -Fr
>
>>
>> Yours,
>> Laurenz Albe

>
>Claudiu


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-05-2008, 09:40 AM
Michael W. Ryder
 
Posts: n/a
Default Re: How to create a CRON entry that will shutdown my server at 1AMeveryday.

Briantb wrote:
> You sure you want to do this?
> Are you really sure?
>
> Why should you not do this -- let me count the ways:
> Someone is going to be running some process one morning
> and you're going to clobber it.
> The crontab has another entry for 1:00 AM and you're going
> to clobber that.
> One evening, there will be an emergency software restore running
> and you'll clobber that.
>
> I keep saying "you''ll" clobber it because once it's discovered
> what happened, it will be your neck in the noose.
>
> The servers aren't PCs running Windows that constantly need
> to be rebooted. I work in a shop that includes about 100 IBM servers.
> Many of them have been up for months -- one for several years --
> without a reboot. If you're using reboot to fix something screwy
> going on, I'd track down the problem and get it fixed.
>


Some outfits have users that do not log out when they go home. If the
backup software does not backup any files that are opened on these desks
than the backup is worthless. I am not saying that shutting down the
system and rebooting before starting the backup is the best solution,
but it is the easiest for a lot of businesses. Personally, I run the
backup after making sure that all users are logged off but a lot of
companies do not want to do this.


> An auto-reboot makes me shiver just thinking of it.
>
> On Fri, 03 Feb 2006 20:07:14 +0200, Claudiu Costin
> <claudiu.costin@orange.ro> wrote:
>
>
>>Laurenz Albe wrote:
>>
>>>Chris <chris@netdesigns.com.ph> wrote:
>>>
>>>>Fellow comp.unix.aix group members, I would like to know how can I put
>>>>a cron entry that will issue a shutdown -Fr everyday at 1am. What file
>>>>do I have to edit or lines that I have to change. Can you please
>>>>enumerate the steps.
>>>
>>>I think it is better for you to read the documentation and understand
>>>what you are doing than to follow a cookbook some cook posts for you,
>>>thereby maybe messing up your machine.
>>>
>>>Read the man page for crontab and use 'crontab -e' to edit your crontab.
>>>
>>>The crontab line should start with '* 1 * * *', I think :^)

>>
>> Nope 8-)
>>0 1 * * * /your/path/to/shutdown -Fr
>>
>>
>>>Yours,
>>>Laurenz Albe

>>
>>Claudiu

>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-05-2008, 09:40 AM
Chris
 
Posts: n/a
Default Re: How to create a CRON entry that will shutdown my server at 1AM everyday.

thanks all for your comment, I would like to share with you that
before the system usually reboots at 1am, and is working fine, however
this past few days I noticed that when the system does not reboot by
itself, I would encounter errors from some applications.. usually it
hangs. Pardon me for my ignorance, but I am not familiar with this
crontab thing. Is there a way where I can see what is in the crontab?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-05-2008, 09:40 AM
Anunay
 
Posts: n/a
Default Re: How to create a CRON entry that will shutdown my server at 1AM everyday.

> Is there a way where I can see what is in the crontab?
man crontab

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-05-2008, 09:41 AM
Tom Hoffmann
 
Posts: n/a
Default Re: How to create a CRON entry that will shutdown my server at 1AMeveryday.

Chris wrote:
> thanks all for your comment, I would like to share with you that
> before the system usually reboots at 1am, and is working fine, however
> this past few days I noticed that when the system does not reboot by
> itself, I would encounter errors from some applications.. usually it
> hangs. Pardon me for my ignorance, but I am not familiar with this
> crontab thing. Is there a way where I can see what is in the crontab?
>

crontab -l
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:42 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com