![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| scp automated script | gholdbhurg | UNIX for Advanced & Expert Users | 5 | 10-27-2008 01:23 AM |
| automated ftp. | sangfroid | Shell Programming and Scripting | 10 | 05-07-2007 11:52 AM |
| Automated FTP | shauche | UNIX for Advanced & Expert Users | 11 | 07-11-2002 02:08 AM |
| FTP automated? | n9ninchd | UNIX for Dummies Questions & Answers | 6 | 05-18-2001 10:21 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi all,
I'm using Fedora and I want to be able to set my system up to shut down at a specific time ad hoc. I've been trying to do this using the cron but I can't get the init or shutdown routine to work. Can somebody confirm what the problem is ( I presume this task can be done remotely ). Thanks. |
|
||||
|
First you want a shell script which wraps up the shutdown...
First mkdir /root put the following in /root/shutdown.sh Code:
#!/bin/sh echo trying to shutdown at `date`>>/root/shutdown.log shutdown -h now >>/root/shutdown.log get the current crontab crontab -l >crontab edit crontab and add when-to-do-it-according-to-crontab /root/shutdown.sh finally crontab crontab then check with crontab -l |
|
||||
|
Eureka, I've sussed it, needed the full directory path for the shutdown comand.
Thanks for the help Porter. |
| Sponsored Links | ||
|
|