- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- trying to use cron to shutdown L2000.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2002 03:33 AM
09-09-2002 03:33 AM
trying to use cron to shutdown L2000.
Root home directory is /home/root
This is my ???root??? crontab.
00 6 * * * /usr/sbin/shutdown -ry 0 1> /home/root/restart.log 2>
/home/root/restart_error.log #daily restart
I also tried:
00 6 * * * /usr/bin/cd / ; /usr/sbin/shutdown -ry 0 1> /home/root/restart.log 2> /home/root/restart_error.log #daily restart
Thanks In advance:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2002 03:36 AM
09-09-2002 03:36 AM
Re: trying to use cron to shutdown L2000.
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2002 03:39 AM
09-09-2002 03:39 AM
Re: trying to use cron to shutdown L2000.
Anyway, try using at instead:
at 0600 tomorrow
cd /
shutdown -r -y 0
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2002 04:08 AM
09-09-2002 04:08 AM
Re: trying to use cron to shutdown L2000.
A reboot every day is not good practice - search the forum for lots of posts on this.
You need to be at / to reboot and not in roots home dir if it is different from /.
So in your routine you need a :-
cd
Hth
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2002 04:11 AM
09-09-2002 04:11 AM
Re: trying to use cron to shutdown L2000.
Check out this limk:-
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf679dfe5920fd5118fef0090279cd0f9,00.html
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2002 04:12 AM
09-09-2002 04:12 AM
Re: trying to use cron to shutdown L2000.
Make a script called /re_boot and put the following in it:
cd /
shutdown -r -y 0
echo "/re_boot" |at 0600 tomorrow
Then, kick it off manually the first time and it will re-propagate itself from then on.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2002 04:23 AM
09-09-2002 04:23 AM
Re: trying to use cron to shutdown L2000.
you cannot shutdown a system from /home or /opt.you should be in /
so
#this is script "example.sh"
cd /
/usr/sbin/shutdown -ry 0 1> /home/root/restart.log 2>
/home/root/restart_error.log #daily restart
So in your cron
0 6 * * * example.sh
THis is work
Thanks