I am very new to C Programming. I am writing a C Program to run in an UNIX machine which is used to Archive Log files if it exceeds a particular Size.
The thing is the program has to get the details of the file like file name, file path , Threshold Size and Check time from the database.
**Each row in the database is an information about a single Log file. **
If there is ten rows, I have to make ten Fork() calls and get the value from database for each row and check the size and also if the check time is "10" mins, after 10 minutes again i have to check the size of the file.
Its like the program is to run for ever in particular intervals to check the log file size depending upon the Check time defined in table for each row.
I dont know where to start. How to make the program run all the time on a particular interval.
I just need an abstract Idea on how to do this program. Any help is much appreciated.
Thanks in advance