Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-12-2010, 01:09 PM   #1
LQ Newbie
Registered: Sep 2010
Posts: 1

Rep: Reputation: 0
Unhappy writing c program to shutdown linux system

I usually download files from internet throughout the night. I can shut down computer automatically using command

shutdown -P time
This works well ,
but very often ,electric supplies cutoffs and system get rebooted and remain booted uselessly.
In such case i want to use c program to shut down system after particular time which i will add on startup application list.
If i added it on startup application every time i boot the computer it will automatically shutdown after particular time so ,to use the system i should be able to disable that program.
Old 09-12-2010, 01:21 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
Hi, welcome to LQ!

You should be able to use 'at' and a wee shell script for this.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
linux machine shutdown from a C program vijay_babu1981 Programming 14 07-09-2009 12:21 PM
writing a c program in linux which plays an'.wav' file stephenwalter Programming 8 07-09-2005 12:37 AM
Writing a CPU Consume Program to Test a Distributed System russelh Programming 4 11-30-2004 03:27 PM
How does one shutdown and reboot linux from within a program? prometheus7817 Linux - General 2 08-27-2003 07:55 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration