LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 09-21-2004, 04:24 AM   #1
rajesh_b
Member
 
Registered: Sep 2004
Location: Hyderabad.
Posts: 83

Rep: Reputation: 15
sleeping until time comes


I want to write a daemon program (in c) which copies the contents of one folder into another folder. And this must take place daily in between some period of time. i.e. in between start time and end time. Is any body having idea that how can i put the process into the sleep until start time comes and does the task and go into sleep again untill tomorrow' time. I know that there is a sleep function but manual is saying it is not reliabe, because it may return before the period. plz give me some suggetion.

Thanx in advance.

regards,
rajesh.
 
Old 09-21-2004, 04:32 AM   #2
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Have you looked into using cron?
 
Old 09-21-2004, 06:03 AM   #3
bahramH
Member
 
Registered: Apr 2004
Location: France
Distribution: Mandrake
Posts: 67

Rep: Reputation: 15
cron is the best choice for doing regular stuff (end the best answer here).
If you wanted to execute a command only one time at a specified time, look at :
"at"
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sleeping eth1 eth777 Linux - Networking 0 09-13-2005 12:17 PM
longest time awake without sleeping? nixel General 25 05-09-2004 01:42 PM
Sleeping Nukem Mandriva 6 01-07-2004 05:03 AM
Sleeping system wyvis Linux - General 4 01-17-2002 05:06 PM
Sleeping SAMBA CPUNeck Linux - Newbie 3 11-27-2001 12:27 PM


All times are GMT -5. The time now is 05:23 AM.

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